banderson / generator-redux

CLI tools for Redux: next-gen functional Flux/React with devtools
252 stars 36 forks source link

Fresh run fails on NPM install #23

Closed jondejong closed 8 years ago

jondejong commented 8 years ago

Running "yo redux" results in the following errors with latest Node/NPM (5.0.0/3.3.9).

npm WARN EPEERINVALID redux-devtools@2.1.5 requires a peer of redux@^2.0.0 || ^3.0.0 but none was installed.
npm WARN EPEERINVALID react-redux@3.1.0 requires a peer of redux@^2.0.0 || ^3.0.0 but none was installed.
npm WARN EPEERINVALID babel-loader@5.3.3 requires a peer of babel-core@^5.0.0 but none was installed.
jondejong commented 8 years ago

Similar error with Node 4.2.1:

npm ERR! node v4.2.1
npm ERR! npm  v2.14.7
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package babel-core@6.0.12 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer babel-loader@5.3.3 wants babel-core@^5.0.0
banderson commented 8 years ago

@jondejong I just bumped to version 0.3.0 which should have a bunch of fixes for versioning problems across react and redux. Can you see if that latest version fixes this issue for you?

kevinold commented 8 years ago

@banderson I'm seeing something similar on the newly released 0.3.0:

npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/kold/.nvm/versions/node/v0.12.7/bin/node" "/Users/kold/.nvm/versions/node/v0.12.7/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package babel-core does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer babel-loader@5.3.3 wants babel-core@^5.0.0

Updating the generated package.json in the project to use babel-core 5.0.33 in "dependencies" fixed the issue.

I'd vote for moving the npmInstall piece out of Yeoman and moving them into the _package.json file in the templates directory.

kevinold commented 8 years ago

@banderson I'm testing a patch right now

YPCrumble commented 8 years ago

@banderson I'm now getting the following error. Thank you for your work on this!

ERROR in ./js/index.js Module build failed: ReferenceError: [BABEL] Projects/frontend/js/index.js: Unknown option: Projects/frontend/.babelrc.stage at Logger.error (Projects/frontend/node_modules/babel-core/lib/transformation/file/logger.js:43:11) at OptionManager.mergeOptions (Projects/frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:244:18) at OptionManager.addConfig (Projects/frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:205:10) at OptionManager.findConfigs (Projects/frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:346:16) at OptionManager.init (Projects/frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:391:12) at File.initOptions (Projects/frontend/node_modules/babel-core/lib/transformation/file/index.js:191:75) at new File (Projects/frontend/node_modules/babel-core/lib/transformation/file/index.js:122:22) at Pipeline.transform (Projects/frontend/node_modules/babel-core/lib/transformation/pipeline.js:42:16) at transpile (Projects/frontend/node_modules/babel-loader/index.js:12:22) at Object.module.exports (Projects/frontend/node_modules/babel-loader/index.js:69:12)

jondejong commented 8 years ago

Same issue still.

npm WARN EPEERINVALID react-redux@4.0.0 requires a peer of redux@^2.0.0 || ^3.0.0 but none was installed.

npm WARN EPEERINVALID redux-devtools@2.1.5 requires a peer of redux@^2.0.0 || ^3.0.0 but none was installed.

└── UNMET PEER DEPENDENCY redux@1.0.1

npm WARN EPEERINVALID react-redux@4.0.0 requires a peer of redux@^2.0.0 || ^3.0.0 but none was installed.
npm WARN EPEERINVALID redux-devtools@2.1.5 requires a peer of redux@^2.0.0 || ^3.0.0 but none was installed.
npm WARN EPACKAGEJSON redux@0.1.0 No repository field.
npm WARN EPACKAGEJSON redux@0.1.0 No license field.
npm ERR! code 1
jondejong commented 8 years ago

At runtime, I get the same issue as @YPCrumble.

kevinold commented 8 years ago

@YPCrumble @jondejong did you try my patch in #24 ?

YPCrumble commented 8 years ago

@kevinold I saw that later - thank you for posting it. Honestly I am a self-taught amateur so I wasn't sure how to grab your fork and run that on my machine or apply the patch to my existing copy of generator-redux...

What I ended up doing was manually adjusting my package.json after installing 0.3.0 the regular way. I changed babel-core to 5.3.3. That gives an error that you need to also move babel-loader to v5 (you should probably include in your patch?) so I did that manually as well.

[EDIT] Now this works, thank you!

jondejong commented 8 years ago

Sorry, @kevinold, I missed that. Running your patch works for me. Still throws the warning:

npm WARN EPEERINVALID babel-loader@6.0.0 requires a peer of babel-core@^6.0.0 but none was installed.

But otherwise it installs and runs. Thanks!

banderson commented 8 years ago

@jondejong this last issue :arrow_up: should be resolved here, and I published 0.3.1 with these fixes. Let me know if you run into any other problems!

Thanks everyone.

jondejong commented 8 years ago

Thanks!

:+1:

kevinold commented 8 years ago

Awesome @banderson!

Kevin Old kevin@kevinold.com

On Sat, Oct 31, 2015 at 4:52 PM, Jon DeJong notifications@github.com wrote:

:+1 Thanks!

— Reply to this email directly or view it on GitHub https://github.com/banderson/generator-redux/issues/23#issuecomment-152775691 .