0

Node version 16.0 I was able to install Gulp and Yo glabally but unable to install the @microsoft/generator-sharepoint

I got the bellow error

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! Found: webpack@5.75.0 npm ERR! node_modules/@microsoft/generator-sharepoint/node_modules/webpack npm ERR! peerOptional webpack@"^5.35.1" from @rushstack/set-webpack-public-path-plugin@3.3.69 npm ERR! node_modules/@microsoft/generator-sharepoint/node_modules/@rushstack/set-webpack-public-path-plugin npm ERR! @rushstack/set-webpack-public-path-plugin@"3.3.69" from @microsoft/spfx-heft-plugins@1.16.1 npm ERR! node_modules/@microsoft/generator-sharepoint/node_modules/@microsoft/spfx-heft-plugins npm ERR! @microsoft/spfx-heft-plugins@"1.16.1" from @microsoft/generator-sharepoint@1.16.1 npm ERR! node_modules/@microsoft/generator-sharepoint npm ERR! @microsoft/generator-sharepoint@"*" from the root project npm ERR! peerOptional @rushstack/set-webpack-public-path-plugin@"^3.3.69" from @rushstack/webpack4-localization-plugin@0.15.25 npm ERR! node_modules/@microsoft/generator-sharepoint/node_modules/@rushstack/webpack4-localization-plugin npm ERR! @rushstack/webpack4-localization-plugin@"0.15.25" from @microsoft/spfx-heft-plugins@1.16.1 npm ERR! node_modules/@microsoft/generator-sharepoint/node_modules/@microsoft/spfx-heft-plugins npm ERR! @microsoft/spfx-heft-plugins@"1.16.1" from @microsoft/generator-sharepoint@1.16.1 npm ERR! node_modules/@microsoft/generator-sharepoint npm ERR! peerOptional webpack@"^5.35.1" from @rushstack/webpack-plugin-utilities@0.1.36 npm ERR! node_modules/@microsoft/generator-sharepoint/node_modules/@rushstack/set-webpack-public-path-plugin/node_modules/@rushstack/webpack-plugin-utilities npm ERR! @rushstack/webpack-plugin-utilities@"0.1.36" from @rushstack/set-webpack-public-path-plugin@3.3.69 npm ERR! node_modules/@microsoft/generator-sharepoint/node_modules/@rushstack/set-webpack-public-path-plugin npm ERR! @rushstack/set-webpack-public-path-plugin@"3.3.69" from @microsoft/spfx-heft-plugins@1.16.1 npm ERR! node_modules/@microsoft/generator-sharepoint/node_modules/@microsoft/spfx-heft-plugins npm ERR! @microsoft/spfx-heft-plugins@"1.16.1" from @microsoft/generator-sharepoint@1.16.1 npm ERR! node_modules/@microsoft/generator-sharepoint npm ERR! 1 more (@rushstack/webpack4-localization-plugin) npm ERR! 5 more (copy-webpack-plugin, file-loader, sass-loader, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer webpack@"^4.31.0" from @rushstack/webpack4-localization-plugin@0.15.25 npm ERR! node_modules/@microsoft/generator-sharepoint/node_modules/@rushstack/webpack4-localization-plugin npm ERR! @rushstack/webpack4-localization-plugin@"0.15.25" from @microsoft/spfx-heft-plugins@1.16.1 npm ERR! node_modules/@microsoft/generator-sharepoint/node_modules/@microsoft/spfx-heft-plugins npm ERR! @microsoft/spfx-heft-plugins@"1.16.1" from @microsoft/generator-sharepoint@1.16.1 npm ERR! node_modules/@microsoft/generator-sharepoint npm ERR! @microsoft/generator-sharepoint@"*" 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 C:\Users\Bruno.LeandrodaSilva\AppData\Local\npm-cache\eresolve-report.txt for a full report.

Try running npm with elevated prev not working

1 Answers1

0

The documentation referenced Node V16 however, after I downgraded to node v14.15.0 I was able to install @microsoft/generator-sharepoint

So ensure your node version is accurate. Also, I'm using nvm, as I have other projects that require node v12.20.0 and v12.25.0 versions.