react-webpack-generators / generator-react-webpack

Yeoman generator for ReactJS and Webpack
http://newtriks.com/2013/12/31/automating-react-with-yeoman-and-grunt/
MIT License
2.88k stars 355 forks source link

V4 -- npm ls will produce npm errors for peer deps #252

Open sthzg opened 8 years ago

sthzg commented 8 years ago

One thing I've just noticed (and I don't know if you have any influence on it) is that running npm ls on the 4.x generator will produce npm errors:

npm ERR! peer dep missing: webpack@^1.5.3, required by isparta-instrumenter-loader@1.0.1
npm ERR! peer dep missing: webpack@^1.4.0, required by karma-webpack@1.7.0
npm ERR! peer dep missing: webpack@>=2.0.3-beta <3, required by webpack-dev-server@2.0.0-beta

They are obviously dependencies from dependencies, however I don't have this problem when running the command on the stable generator.

Update peerDependencies entries in the offending packages

The installed Webpack version from the template is ^2.1.0-beta.6. As npm3 doesn't install peerDependencies, the first two errors make sense (^1.5.3 and ^1.4.0 won't match 2.x releases, right?). Not sure though why the last one doesn't match, since 2.1.0-beta.6 should qualify as greater than 2.0.3-beta. 💭

weblogixx commented 8 years ago

Hi @sthzg,

thank you for the feedback. Yes, there are some problems with peer deps not loading correctly. I removed isparta-instrumenter-loader (which is deprecated) in favour of isparta-loader, which makes the first problem go away. Webpack-dev-Server still has a strange dependency baked in (there already exists an issue in the repo for this). Karma-Webpack does not have official support for webpack-2 currently.

I honestly dont know when webpack-2 will be released as the next stable (usually, the anwer is "when its done"), but I think this issues will go away when it is. Hope we do not have to wait that long for it :(