stylesuxx / generator-react-webpack-redux

React Webpack Generator including Redux support
Other
552 stars 84 forks source link

npm start failing #46

Closed Pesinn closed 7 years ago

Pesinn commented 8 years ago

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! react-webpack-redux@0.0.1 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 react-webpack-redux@0.0.1 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

stylesuxx commented 8 years ago

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 commented 8 years ago

Hey stylesuxx and thanks for fast response.

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

+-- UNMET PEER DEPENDENCY webpack@2.1.0-beta.25

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 fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN webpack-dev-server@2.0.0-beta 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 react-app@0.0.1 C:\Projects\Test\reactApp +-- react-redux@4.4.5 | -- hoist-non-react-statics@1.2.0 +-- redux@3.6.0 | +-- lodash-es@4.16.1 |-- symbol-observable@1.0.2 `-- UNMET PEER DEPENDENCY webpack@2.1.0-beta.25

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 fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN webpack-dev-server@2.0.0-beta requires a peer of webpack@>=2.0.3-beta <3 but none was installed.

stylesuxx commented 8 years ago

so, did you install webpack as peer dep?

npm install webpack
Pesinn commented 8 years ago

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

I always get this error:

`-- UNMET PEER DEPENDENCY webpack@2.1.0-beta.2x

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 fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN webpack-dev-server@2.0.0-beta 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 commented 8 years ago

So

npm install webpack@2.1.0-beta.2x

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 commented 8 years ago

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

And npm install webpack@2.1.0-beta.2x 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 commented 8 years ago

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 commented 8 years ago

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! react-redux-webpack@0.0.1 start: npm run serve:dev npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-redux-webpack@0.0.1 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 commented 8 years ago

OK, I am getting this now too. Could you guys please try installing webpack@2.1.0-beta.6 this is the version I am using in one of my older setups and it seems to be working with it.

lexcaraig commented 8 years ago

Yay! Thank You!

Installing webpack@2.1.0-beta.6 works fine on me.

stinaq commented 8 years ago

Hi. I get the same error as @Pesinn reports. Running npm install webpack@2.1.0-beta.6 after the generator finished (with errors) and then running npm start seemed to fix it

Pesinn commented 8 years ago

Sorry for late response, but it works now when I install webpack@2.1.0-beta.6.

Thank you :)

Sen-Zhang commented 8 years ago

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 commented 8 years ago

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

then npm start worked for me ...

stylesuxx commented 8 years ago

@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 commented 8 years ago

@stylesuxx Following your instructions worked for me, too (npm install webpack@webpack@2.1.0-beta.6)

Sen-Zhang commented 8 years ago

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

stylesuxx commented 7 years ago

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