Thank you for npm πβ¨
I noticed this with 5.0.x and found it was still an issue in 5.1.0 so thought I'd let you know :)
I'm opening this issue because:
- npm is producing an incorrect install.
What's going wrong?
next@2 depends on webpack 2. next@3 depends on webpack 3.
With my project on next@2, I can run npm ls webpack and get:
[email protected] /Users/somehats/Projects/tmp
βββ¬ [email protected]
βββ [email protected]
I can also successfully run next build.
If I run npm i next@beta, I get:
> [email protected] postinstall /Users/somehats/Projects/tmp/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
npm WARN [email protected] requires a peer of webpack@^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3.0.0 but none was installed.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
+ [email protected]
added 56 packages, removed 105 packages, updated 1 package and moved 7 packages in 10.159s
Now, running npm ls webpack gives:
[email protected] /Users/somehats/Projects/tmp
βββ (empty)
and next build fails as it can't find webpack.
The only thing that seems to fix things is rm -rf node_modules package-lock.json && npm i. After that, npm ls webpack gives:
[email protected] /Users/somehats/Projects/tmp
βββ¬ [email protected]
βββ [email protected]
and next build runs successfully.
How can the CLI team reproduce the problem?
Start with this package.json:
{
"name": "tmp",
"version": "1.0.0",
"dependencies": {
"next": "2",
"react": "^15.6.1",
"react-dom": "^15.6.1"
}
}
Run npm i. npm ls webpack should show webpack as above. Run npm i next@beta. Now npm ls webpack should give 'empty'.
supporting information:
Thank you for npm πβ¨
I noticed this with 5.0.x and found it was still an issue in 5.1.0 so thought I'd let you know :)
I'm opening this issue because:
What's going wrong?
next@2 depends on webpack 2. next@3 depends on webpack 3.
With my project on next@2, I can run
npm ls webpackand get:I can also successfully run
next build.If I run
npm i next@beta, I get:Now, running
npm ls webpackgives:and
next buildfails as it can't find webpack.The only thing that seems to fix things is
rm -rf node_modules package-lock.json && npm i. After that,npm ls webpackgives:and
next buildruns successfully.How can the CLI team reproduce the problem?
Start with this package.json:
{ "name": "tmp", "version": "1.0.0", "dependencies": { "next": "2", "react": "^15.6.1", "react-dom": "^15.6.1" } }Run
npm i.npm ls webpackshould show webpack as above. Runnpm i next@beta. Nownpm ls webpackshould give 'empty'.supporting information:
npm -vprints: 5.1.0node -vprints: v8.1.2npm config get registryprints: https://registry.npmjs.org/