Cannot run npm update
on [email protected] due to storybook's peer dependency #12939
Description
Describe the bug
After upgrading npm to [email protected], npm update
To Reproduce
- Go to a storybook project
- run npm install -g [email protected] (any npm 7 version seems the same)
- npm update
Expected behavior
Should update the projects.
But it shows:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: root@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! peer react@"^16.8.0" from @storybook/[email protected]
npm ERR! node_modules/@storybook/addon-essentials
npm ERR! dev @storybook/addon-essentials@"^6.0.27" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.1" from [email protected]
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@"*" from @storybook/[email protected]
npm ERR! node_modules/@storybook/addon-essentials
npm ERR! dev @storybook/addon-essentials@"^6.0.27" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/xiaoshuw/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xiaoshuw/.npm/_logs/2020-10-28T18_57_59_771Z-debug.log
I am guessing it is due to the "react-dom":"*" on the addon-essentials
"peerDependencies": {
"babel-loader": "^8.0.0",
"react": "^16.8.0",
"react-dom": "*",
"react-is": "^16.8.0"
},