Node.js 15+ and npm 7 might cause some packages to break. How to get around it?
npm v7 has changed some internals of it so you might run into some problems with installing packages.
Here's an example what might happen:
$ npm install --save-dev @nuxtjs/storybook npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! Found: email@example.com npm ERR! node_modules/react npm ERR! peerOptional react@"^16.8.0 || ^17.0.0" from @firstname.lastname@example.org ...
and the error message goes on.
The fix is easy:
npm install --save-dev @nuxtjs/storybook--legacy-peer-deps
This might not be required anymore as some packages update to more proper ways of handling dependencies.
Read more details about this change on npm blog.