Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Unable to resolve dependency tree #55

Open
chrisselwyn opened this issue Jan 1, 2022 · 0 comments
Open

Unable to resolve dependency tree #55

chrisselwyn opened this issue Jan 1, 2022 · 0 comments

Comments

@chrisselwyn
Copy link

I am trying to learn about strapi. So I thought I would follow one of the starter packs.

Using the command
npx create-strapi-starter my-project next-blog
gives the error...

npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.2" from next@11.1.3
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.3
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.

I have tried setting
npm config set legacy-peer-deps true
but then I get

[develop:frontend] ready - started server on 0.0.0.0:3000, url: http://localhost:3000
[develop:frontend] node:internal/modules/cjs/loader:933
[develop:frontend] const err = new Error(message);
[develop:frontend] ^
[develop:frontend]
[develop:frontend] Error: Cannot find module 'string-hash'
[develop:frontend] Require stack:
[develop:frontend] - C:\cygwin64\home\chris\strapi\my-project\frontend\node_modules\styled-jsx\dist\stylesheet-registry.js
[develop:frontend] - C:\cygwin64\home\chris\strapi\my-project\frontend\node_modules\styled-jsx\dist\style.js
[develop:frontend] - C:\cygwin64\home\chris\strapi\my-project\frontend\node_modules\styled-jsx\dist\server.js
[develop:frontend] - C:\cygwin64\home\chris\strapi\my-project\frontend\node_modules\styled-jsx\server.js
[develop:frontend] - C:\cygwin64\home\chris\strapi\my-project\frontend\node_modules\next\dist\server\render.js
[develop:frontend] - C:\cygwin64\home\chris\strapi\my-project\frontend\node_modules\next\dist\server\next-server.js
[develop:frontend] - C:\cygwin64\home\chris\strapi\my-project\frontend\node_modules\next\dist\server\next.js
[develop:frontend] - C:\cygwin64\home\chris\strapi\my-project\frontend\node_modules\next\dist\server\lib\start-server.js
[develop:frontend] - C:\cygwin64\home\chris\strapi\my-project\frontend\node_modules\next\dist\cli\next-dev.js
[develop:frontend] - C:\cygwin64\home\chris\strapi\my-project\frontend\node_modules\next\dist\bin\next
[develop:frontend] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
[develop:frontend] at Function.Module._load (node:internal/modules/cjs/loader:778:27)
[develop:frontend] at Module.require (node:internal/modules/cjs/loader:1005:19)
[develop:frontend] at require (node:internal/modules/cjs/helpers:102:18)
[develop:frontend] at Object. (C:\cygwin64\home\chris\strapi\my-project\frontend\node_modules\styled-jsx\dist\stylesheet-registry.js:6:

[develop:frontend] at Module._compile (node:internal/modules/cjs/loader:1101:14)
[develop:frontend] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
[develop:frontend] at Module.load (node:internal/modules/cjs/loader:981:32)
[develop:frontend] at Function.Module._load (node:internal/modules/cjs/loader:822:12)
[develop:frontend] at Module.require (node:internal/modules/cjs/loader:1005:19) {
[develop:frontend] code: 'MODULE_NOT_FOUND',

when starting the frontend (the backend seems to start OK).
Is there a dependency resolution that I missing?

Chris

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

No branches or pull requests

1 participant