Skip to content
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

npm start failing #46

Closed
Pesinn opened this issue Sep 24, 2016 · 18 comments
Closed

npm start failing #46

Pesinn opened this issue Sep 24, 2016 · 18 comments

Comments

@Pesinn
Copy link

Pesinn commented Sep 24, 2016

I get this error when I do: npm start

npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users...\npm\node_modules\npm\bin\npm-cli.js" "run" "dist"
npm ERR! node v4.5.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dist: npm run clean && npm run copy && webpack --progress --bail --env dist -p
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve:dev script 'webpack-dev-server --open --env dev'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react-webpack-redux package,
npm ERR! not with npm itself.

I have the latest node- and npm versions:
node version: v4.5.0
npm version: 3.10.8

@Pesinn Pesinn changed the title npm install -g generator-react-webpack-redux npm start failing Sep 24, 2016
@stylesuxx
Copy link
Owner

Hey @Pesinn,
node v4.5.0 is not the latest version - it is LTS. 6.x is the latest version.
Nevertheless, it should work with your versions.

Were there any errors during genration of the project?

@Pesinn
Copy link
Author

Pesinn commented Sep 24, 2016

Hey stylesuxx and thanks for fast response.

I get this error after running yo generator-react-webpack-redux

+-- UNMET PEER DEPENDENCY [email protected]

Here is detailed error:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN [email protected] requires a peer of webpack@>=2.0.3-beta <3 but none was installed.
force .eslintrc
create src\stores\index.js
create src\reducers\index.js
create src\actions\const.js
create src\actions\index.js
force src\index.js
create src\containers\App.js
[email protected] C:\Projects\Test\reactApp
+-- [email protected]
| -- [email protected] +-- [email protected] | +-- [email protected] |-- [email protected]
`-- UNMET PEER DEPENDENCY [email protected]

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN [email protected] requires a peer of webpack@>=2.0.3-beta <3 but none was installed.

@stylesuxx
Copy link
Owner

so, did you install webpack as peer dep?

npm install webpack

@Pesinn
Copy link
Author

Pesinn commented Sep 25, 2016

I've tried to install different versions of webpack, but none of them seems to work.

I always get this error:

`-- UNMET PEER DEPENDENCY [email protected]

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN [email protected] requires a peer of webpack@>=2.0.3-beta <3 but none was installed.
npm ERR! code 1

I thought it could be some problem with npm but then I installed another generator, that has webpack, without any problems.

@stylesuxx
Copy link
Owner

So

npm install [email protected]

in your project root does not solve the problem?

Do you use nvm? Maybe you could quickly switch to a newer node version and generate a fresh project. I use v6.6.0 for development. I just want to cross check, since I do not have windows I can not really test that case properly.

@Pesinn
Copy link
Author

Pesinn commented Sep 25, 2016

I installed version v.6.6.0 but it doesn't make any difference. I get the same error.

And npm install [email protected] isn't working either. I tried few beta versions, from 2.2 up to 2.5.

I also tried to uninstall webpack and install it again, and webpack-dev-server also. But nothing works.

@stylesuxx
Copy link
Owner

Hmm, do you, by any chance have webpack installed globally? If so please remove it, so the project uses the locally installed webpack version.

That's the only thing I can think of right now.

I do not have a windows dev setup on which I could test, but can you please post output of

node -v
npm -v

Maybe I can ask someone for help.

@lexcaraig
Copy link

Hi, i got the same problem.

`

node -v && npm -v
v6.6.0
3.10.3

npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.6.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: npm run serve:dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'npm run serve:dev'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react-redux-webpack package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run serve:dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs react-redux-webpack
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls react-redux-webpack
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/lcaraig/Documents/EXIST/OTHERS/test folder/react-webpack-redux/npm-debug.log

`

I already install webpack and webpack-dev-server

@stylesuxx
Copy link
Owner

OK, I am getting this now too.
Could you guys please try installing [email protected] this is the version I am using in one of my older setups and it seems to be working with it.

@lexcaraig
Copy link

Yay! Thank You!

Installing [email protected] works fine on me.

@stinaq
Copy link

stinaq commented Oct 1, 2016

Hi. I get the same error as @Pesinn reports. Running npm install [email protected] after the generator finished (with errors) and then running npm start seemed to fix it

@Pesinn
Copy link
Author

Pesinn commented Oct 2, 2016

Sorry for late response, but it works now when I install [email protected].

Thank you :)

@Sen-Zhang
Copy link

Sen-Zhang commented Oct 15, 2016

The following is my config with the latest webpack and webpack-dev-server which can work.

"webpack": "2.1.0-beta.22",
"webpack-dev-server": "^2.1.0-beta.9"

@erfangc
Copy link

erfangc commented Oct 29, 2016

it looks like beta 23+ or so introduced config schema validation ... so first:

  • debug: false has to be removed from ./conf/webpack/Base.js
  • resolve.extensions[0] first element is blank .. should be removed to just be extensions: ['.js', '.jsx']
  • all of module.preLoaders has to be deleted

then npm start worked for me ...

@stylesuxx
Copy link
Owner

@erfangc Thank you for this. Point is - this is part of the main generator and not this one, I am depending on the main generator and made the mistake to update my generator to the newest version of the base generator which is still in beta, and will be as long as webpack is...

@albertwchang
Copy link

@stylesuxx Following your instructions worked for me, too (npm install webpack@[email protected])

@Sen-Zhang
Copy link

@erfangc good to know the change of webpack 23+ 👍

@stylesuxx
Copy link
Owner

Webpack is stable - this should no longer be an issue. Closing this down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants