question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react-scripts@1.0.0 can’t `npm start` if dependencies include Storybook

See original GitHub issue

If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.

Can you reproduce the problem with latest npm?

Yes with latest yarn

Many errors, especially related to “missing modules”, are due to npm bugs.

If you’re using Windows, follow these instructions to update npm.

If you’re using OS X or Linux, run this to update npm:

npm install -g npm@latest

cd your_project_directory
rm -rf node_modules
npm install

I did npm upgrade -g yarn (yarn --version gives 0.24.4) I did rm -rf node_modules yarn install

Then try to reproduce the issue again.

Can you still reproduce it? Yes

Description

What are you reporting? Unable to run yarn start

Expected behavior

App loads on development server

Tell us what you think should happen.

Project was building before upgrading to react-scripts 1.0.0 I was on 0.9.5 before.

Actual behavior

Tell us what actually happens. Getting this stacktrace

TypeError: Cannot read property 'request' of undefined
  
  - ExternalModuleFactoryPlugin.js:37 handleExternals
    [mustang-web]/[webpack]/lib/ExternalModuleFactoryPlugin.js:37:33
  
  - ExternalModuleFactoryPlugin.js:46 next
    [mustang-web]/[webpack]/lib/ExternalModuleFactoryPlugin.js:46:8
  
  - ExternalModuleFactoryPlugin.js:59 handleExternals
    [mustang-web]/[webpack]/lib/ExternalModuleFactoryPlugin.js:59:7
  
  - ExternalModuleFactoryPlugin.js:79 ExternalModuleFactoryPlugin.<anonymous>
    [mustang-web]/[webpack]/lib/ExternalModuleFactoryPlugin.js:79:5
  
  - NormalModuleFactory.js:246 applyPluginsAsyncWaterfall
    [mustang-web]/[react-scripts]/[webpack]/lib/NormalModuleFactory.js:246:4
  
  - Tapable.js:204 
    [mustang-web]/[react-scripts]/[tapable]/lib/Tapable.js:204:11
  
  - IgnorePlugin.js:56 IgnorePlugin.checkIgnore
    [mustang-web]/[react-scripts]/[webpack]/lib/IgnorePlugin.js:56:10
  
  - Tapable.js:208 NormalModuleFactory.applyPluginsAsyncWaterfall
    [mustang-web]/[react-scripts]/[tapable]/lib/Tapable.js:208:13
  
  - NormalModuleFactory.js:230 NormalModuleFactory.create
    [mustang-web]/[react-scripts]/[webpack]/lib/NormalModuleFactory.js:230:8
  
  - Compilation.js:382 Compilation._addModuleChain
    [mustang-web]/[react-scripts]/[webpack]/lib/Compilation.js:382:17
  
  - Compilation.js:464 Compilation.addEntry
    [mustang-web]/[react-scripts]/[webpack]/lib/Compilation.js:464:8
  
  - SingleEntryPlugin.js:22 SingleEntryPlugin.<anonymous>
    [mustang-web]/[webpack]/lib/SingleEntryPlugin.js:22:15
  
  - Tapable.js:229 Compiler.applyPluginsParallel
    [mustang-web]/[react-scripts]/[tapable]/lib/Tapable.js:229:14
  
  - Compiler.js:488 
    [mustang-web]/[react-scripts]/[webpack]/lib/Compiler.js:488:8
  
  - Tapable.js:131 Compiler.applyPluginsAsyncSeries
    [mustang-web]/[react-scripts]/[tapable]/lib/Tapable.js:131:46
  
  - Compiler.js:481 Compiler.compile
    [mustang-web]/[react-scripts]/[webpack]/lib/Compiler.js:481:7

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected):
npm ls react-scripts                                                                                                                                           [10:58:24 PM]
mustang-web@0.1.0 /Users/drew/projects/mustang/mustang-web
└─┬ react-scripts@1.0.0
  └── UNMET PEER DEPENDENCY webpack@2.5.1

npm ERR! peer dep missing: webpack@2, required by babel-loader@7.0.0
npm ERR! peer dep missing: webpack@^2.2.0, required by extract-text-webpack-plugin@2.1.0
npm ERR! peer dep missing: webpack@^2.2.0, required by webpack-dev-server@2.4.5
  1. node -v: v7.10.0

  2. npm -v: 4.2.0

  3. yarn -v: v0.24.4

Then, specify:

  1. Operating system: OSX
  2. Browser and version: Chrome

Reproducible Demo

This is probably something really obvious. Let me know if you would like me to make a public repo. Sorry my code is in a private repo.

Please take the time to create a new app that reproduces the issue.

Alternatively, you could copy your app that experiences the problem and start removing things until you’re left with the minimal reproducible demo.

(Accidentally, you might get to the root of your problem during that process.)

Push to GitHub and paste the link here.

By doing this, you’re helping the Create React App contributors a big time! Demonstrable issues gets fixed faster.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

13reactions
maximegcommented, May 19, 2017

For those encountering this issue, running yarn upgrade after running yarn add --dev --exact react-scripts@1.0.0 solved the issue without removing storybook.

2reactions
gaearoncommented, May 19, 2017

I have hidden the Storybook integration from the docs for now: https://github.com/facebookincubator/create-react-app/pull/2252. And have filed an issue against Storybook: https://github.com/storybooks/storybook/issues/1073.

I don’t think there’s anything actionable for us in this issue, but please file bugs with npm and Yarn if you see them not respecting dependency trees.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'npm start' returns error: "There might be a problem with the ...
In my case, I solved my problem in this way. create a .env at the root of the folder react folder; type SKIP_PREFLIGHT_CHECK=true...
Read more >
Cannot start React App after installing Storybook? Here's how ...
Remove "babel-loader" from dependencies and/or devDependencies in the package.json file in your project folder. 4. Run npm install ...
Read more >
@biggive/components - npm
Start using @biggive/components in your project by running `npm i ... If you make a new one, it's a good idea to add...
Read more >
Build and publish a React/Typescript component library ...
You can now run npm run storybook and that should boot up Storybook for you with ... Since we are building a component...
Read more >
hephalump-react-storybook-components - npm package - Snyk
npm run eject. Note: this is a one-way operation. Once you eject , you can't go back! If you aren ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found