Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next-blog installation failed at /frontend - unable to resolve dependency tree #73

Open
davemoz opened this issue Jan 17, 2023 · 1 comment

Comments

@davemoz
Copy link

davemoz commented Jan 17, 2023

The installation using npx create-strapi-starter my-site next-blog fails at the /frontend. I get the following dependency error:

Installing frontend dependencies
⠴ Installing dependencies:This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: Command failed with exit code 1: npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: my-next-blog@1.0.3
npm ERR! Found: react@17.0.0
npm ERR! node_modules/react
npm ERR!   react@"17.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.2" from next@11.1.4
npm ERR! node_modules/next
npm ERR!   next@"^11.0.0" from the root project
npm ERR!   peer next@">=10.2.0" from eslint-config-next@11.1.4
npm ERR!   node_modules/eslint-config-next
npm ERR!     dev eslint-config-next@"^11.0.1" 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!

Would be great to see this starter use the latest version of NextJs (v13), or at least a version closer to it—v11 is pretty out of date.

Node: v16.14.0
npm: v8.3.1

@bastiW
Copy link

bastiW commented Jan 18, 2023

as a workaround, you manually delete all yarn.lock / package.lock files
install it again
set the node version as follows:

  • nvm use 16 for the Frontend
  • nvm use 18 for the Backend

https://stackoverflow.com/questions/72391214/next-js-strapi-error-typeerror-fetch-failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants