npm ERR! While resolving: @sitecore-jss/sitecore-jss-nextjs@19.0.2

Context and Solution: This is an error that occurs when you try to execute npm install (in my case, for Sitecore Edge Demo project: the \Sitecore.Demo.Edge\Website\src\rendering folder). This error was disallowing the npm_modules folder to be created. I feel this is a general error and can occur in conjunction with npm install command. When I checked the esolve-report.txt under \AppData\Local\npm-cache, i found that I could use the --force option on npm install. Once I executed npm install --force, this error was gone and node_modules folder was also created as part of the npm install.



Error:



npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

npm ERR! code ERESOLVE

npm ERR! ERESOLVE could not resolve

npm ERR!

npm ERR! While resolving: @sitecore-jss/sitecore-jss-nextjs@19.0.2

npm ERR! Found: next@12.1.0

npm ERR! node_modules/next

npm ERR!   next@"^12.1.0" from the root project

npm ERR!   peer next@">=10" from @auth0/nextjs-auth0@1.7.0

npm ERR!   node_modules/@auth0/nextjs-auth0

npm ERR!     @auth0/nextjs-auth0@"^1.7.0" from the root project

npm ERR!   1 more (eslint-config-next)

npm ERR!

npm ERR! Could not resolve dependency:

npm ERR! peer next@"^11.0.1" from @sitecore-jss/sitecore-jss-nextjs@19.0.2

npm ERR! node_modules/@sitecore-jss/sitecore-jss-nextjs

npm ERR!   @sitecore-jss/sitecore-jss-nextjs@"^19.0.0-canary.63" from the root project

npm ERR!

npm ERR! Conflicting peer dependency: next@11.1.4

npm ERR! node_modules/next

npm ERR!   peer next@"^11.0.1" from @sitecore-jss/sitecore-jss-nextjs@19.0.2

npm ERR!   node_modules/@sitecore-jss/sitecore-jss-nextjs

npm ERR!     @sitecore-jss/sitecore-jss-nextjs@"^19.0.0-canary.63" 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\navadmin\AppData\Local\npm-cache\eresolve-report.txt for a full report.


npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\navadmin\AppData\Local\npm-cache\_logs\2022-07-13T03_11_06_573Z-debug-0.log

Comments

Popular Posts