-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'request' of undefined #2352
Comments
I get this same error - after
Then that is removed and the above error displays in the terminal as well as the console/browser |
OK - found the issue for me. I had a devDependency (an older version of kadira/storybook) that was depending on an old version of webpack 1.4.x - and that was what was being installed, not 2.5.x. I |
Seems like the order in package.json matters too. Putting storybook last in the dev dependencies seems to fix it for me. |
For me, this was caused by an old version of |
Note you shouldn't install any plugins directly if you don't eject. |
@gaearon, is it possible to display more informative error messages instead of "Cannot read property 'request' of undefined"? There is plenty of the time required to find the issue when this happens. |
How did you get this issue? From my understanding it only happens when you knowingly install tools like Webpack (or rather their incompatible versions) into a projected generated with Create React App. Which has always been unsupported. Ideally we should do a preflight check and fail early with a meaningful message if we detect that installed Babel, Webpack, Jest etc manually. If you'd like to help implementing this there is an existing issue: #1795. |
I had to run eject to see a more understandable error. |
If you see this error before ejecting something is wrong. But we can't figure out what if you don't provide a project reproducing this. |
I'm locking this issue to prevent further drive-by comments. +1s and "I have this too" are not helpful to diagnose the problem. If you experience this problem please file a new bug report and fill all the fields including providing a project that reproduces this. You can either try to reproduce it on a new project, or delete as much as possible from your project until you find the bare minimum necessary to reproduce it. For this issue, reports without example projects are not helpful because this is almost certainly a problem with either the package manager you are using, or additional dependencies you installed manually. |
To be clear, here's how you should generally solve this if you haven't ejected:
|
Hi. I 'm having problem running the create-react-app.
Here is the error I've got.
`
TypeError: Cannot read property 'request' of undefined
ExternalModuleFactoryPlugin.js:37 handleExternals
[www-react-client]/[webpack]/lib/ExternalModuleFactoryPlugin.js:37:33
ExternalModuleFactoryPlugin.js:46 next
[www-react-client]/[webpack]/lib/ExternalModuleFactoryPlugin.js:46:8
ExternalModuleFactoryPlugin.js:59 handleExternals
[www-react-client]/[webpack]/lib/ExternalModuleFactoryPlugin.js:59:7
ExternalModuleFactoryPlugin.js:79 ExternalModuleFactoryPlugin.
[www-react-client]/[webpack]/lib/ExternalModuleFactoryPlugin.js:79:5
NormalModuleFactory.js:246 applyPluginsAsyncWaterfall
[www-react-client]/[react-scripts]/[webpack]/lib/NormalModuleFactory.js:246:4
Tapable.js:204
[www-react-client]/[react-scripts]/[tapable]/lib/Tapable.js:204:11
IgnorePlugin.js:56 IgnorePlugin.checkIgnore
[www-react-client]/[react-scripts]/[webpack]/lib/IgnorePlugin.js:56:10
Tapable.js:208 NormalModuleFactory.applyPluginsAsyncWaterfall
[www-react-client]/[react-scripts]/[tapable]/lib/Tapable.js:208:13
NormalModuleFactory.js:230 NormalModuleFactory.create
[www-react-client]/[react-scripts]/[webpack]/lib/NormalModuleFactory.js:230:8
Compilation.js:382 Compilation._addModuleChain
[www-react-client]/[react-scripts]/[webpack]/lib/Compilation.js:382:17
Compilation.js:464 Compilation.addEntry
[www-react-client]/[react-scripts]/[webpack]/lib/Compilation.js:464:8
SingleEntryPlugin.js:22 SingleEntryPlugin.
[www-react-client]/[webpack]/lib/SingleEntryPlugin.js:22:15
Tapable.js:229 Compiler.applyPluginsParallel
[www-react-client]/[react-scripts]/[tapable]/lib/Tapable.js:229:14
Compiler.js:488
[www-react-client]/[react-scripts]/[webpack]/lib/Compiler.js:488:8
Tapable.js:131 Compiler.applyPluginsAsyncSeries
[www-react-client]/[react-scripts]/[tapable]/lib/Tapable.js:131:46
Compiler.js:481 Compiler.compile
[www-react-client]/[react-scripts]/[webpack]/lib/Compiler.js:481:7
`
Thanks
The text was updated successfully, but these errors were encountered: