-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
react-scripts@1.0.0 can’t npm start
if dependencies include Storybook
#2225
Comments
This might be related to the following yarn issue: yarnpkg/yarn#3315. |
Can you please check if this reproduces if you run |
I also got invalid webpack version in a repro project just created: #2232 (comment) |
This is a bug in NPM who is failing to install webpack. NPM:
Yarn:
|
So is it npm or Yarn bug? |
Agree with @Timer. Can confirm the dependency graph looks as expected when using yarn, most probably an npm issue since the webpack dependency in CRAs package.json looks good IMO. Nonetheless something I assume will hit many devs as npm v3 is included in Node.js LTS. Also verified this is an issue with Node.js v7.10.0 (stable) / npm v4.2.0. |
I’m confused that original poster used Yarn. So this is an issue for both? |
I had the same issue with |
It is super weird if npm and Yarn have the same bug. It's kinda hard to believe. |
When using |
It might mean that there's a mistake somewhere in dependency tree of some package which is surfacing different messages. I wonder where it is. |
What can I do to help out? What info do you need? |
Yeah, I got so hung up in the dependency graph, I didn't even try to start the server. This is what I observe in my repro project: yarn
npm
$ npm start
> create-react-app-v1-upgrade@0.1.0 start /create-react-app-v1-upgrade
> react-scripts start
webpack.validateSchema is not a function
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! create-react-app-v1-upgrade@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1 Difference seems to be that yarn at least gets webpack v2 installed, but there's still some issues with the dependencies installed. |
Probably the best thing to do would be to create a very isolated test (e.g. a package listing those two as deps) that reproduces the issue, and then file issues both with npm and Yarn. |
Sounds like a good idea 👍 @hoest thanks, removing storybook from my test project seemed to fix the issue. |
npm start
if dependencies include Storybook
FYI for other storybook users, upgrading to webpack v2 seems to be just around the corner in the upcoming v3 release: https://github.com/storybooks/storybook/pull/1047/files#diff-4ac32a78649ca5bdd8e0ba38b7006a1eR5 |
I can confirm removing storybook fixed the issue for me. Thanks everyone! |
I have hidden the Storybook integration from the docs for now: #2252. 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. |
For those encountering this issue, running |
@maximeg's fix worked for me, but I was already on a version of |
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:
I did
npm upgrade -g yarn
(yarn --version
gives0.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 on0.9.5
before.Actual behavior
Tell us what actually happens.
Getting this stacktrace
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected):node -v
:v7.10.0
npm -v
:4.2.0
yarn -v
:v0.24.4
Then, specify:
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.
The text was updated successfully, but these errors were encountered: