Uncaught ReferenceError: ReactDOM is not defined with bundle.js
I am having an issue trying to load my application. I am new to React and cannot figure out what the problem is. Below are two console errors I am getting. Can someone lend a hand? I am happy to add code to this post but I am not sure what file you would need to see. I have tried going through many SO posts but a am referencing ReactDOM correctly (case wise) in my code from what the posts say. Thanks for the help!
Failed to load resource: the server responded with a status of 404 (Not Found) Uncaught ReferenceError: ReactDOM is not defined at eval (eval at <anonymous> (bundle.js:6797), <anonymous>:85:3) at Object.<anonymous> (bundle.js:6797) at __webpack_require__ (bundle.js:20) at eval (eval at <anonymous> (bundle.js:1151), <anonymous>:21:16) at Object.<anonymous> (bundle.js:1151) at __webpack_require__ (bundle.js:20) at eval (eval at <anonymous> (bundle.js:47), <anonymous>:11:15) at Object.<anonymous> (bundle.js:47) at __webpack_require__ (bundle.js:20) at bundle.js:40
Without knowing your setup it's difficult, but the app is either not importing the
react-dom module, or it's not installed at all.
Are you using a boilerplate?
Is there an entry similar to
"react-dom": "^15.5.3" ?
If so, just do an
npm install in that directory.
Now check: does the module in which you'd like to use ReactDOM import
const ReactDOM = require('react-dom'); // OR import ReactDOM from 'react-dom';
If all this is done, your next step might be to check your webpack build script.
Not much else to say without knowing how you've set up the project.
Check your entry file (which should be defined inside your webpack.config.js).
Did your forget to put
import ReactDOM from 'react-dom?
check your version of nodejs, if it is in
version 10 use import ReactDOM from 'react-dom';
if it is in version 8 use const ReactDOM = require ('react-dom');
ReactDom is not defined - Programming Help, const JSX = ( <div> <h1>Hello World</h1> <p>Lets render this to the DOM</p> </div> ); // change code below this line ReactDom.render(JSX, Re: Uncaught ReferenceError: bundle is not defined on Magento 18.104.22.168 Sounds like there might be something missing from one og your product view template files. If you view the source of your bundled product page can you find a line like:
Uncaught ReferenceError: ReactDOM is not defined - html, public/dist/bundle.js" }, plugins: [ new WebpackNotifierPlugin() ], module: I met this error : Uncaught ReferenceError: ReactDOM is not defined when type webpack && webpack ./client/client.js dist/bundle.js \ && webpack-dev-server --progress --color. You need to run webpack again since if some sources in the library change you will get the last changes then in the dist/bundle.js package (of course you can add like a grunt file watch task for this). webpack-dev-server will run the server then.
Manatee Mistakes: Uncaught ReferenceError: ReactDOM is not , Uncaught ReferenceError: ReactDOM is not defined. I made this https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react-dom.js. Doing just CRA 2 breaks the use of mapbox-gl: Uncaught ReferenceError: _typeof is not defined #5267