strapi-starter-gatsby-blog
strapi-starter-gatsby-blog copied to clipboard
error when creating the project using npx
Tried creating the project using npx, but there seems to be an error in a dependency

Tried creating the project using npx, but there seems to be an error in a dependency
![]()
I have the same error.
same for me with:
node -v: v16.13.1
yarn -v: 1.22.15
npm -v: 8.1.2
I have same error, with npx or yarn.
Try this command
yarn create strapi-app my-blog --template blog
## or
npx create-strapi-app my-blog --template blog
I found this solution on the repos
Try this command
yarn create strapi-app my-blog --template blog ## or npx create-strapi-app my-blog --template blog
I found this solution on the repos
This creates a new project with only the strapi backend, the Gatsby frontend won't be available. Issue still persists for this strapi starter with gatsby
I'm also getting the same errors with both npx and yarn.
Solution here:
https://github.com/strapi/strapi-starter-next-ecommerce/issues/21#issuecomment-986111206
Just to follow up what @AleCandido kindly linked, to solve it just add a "@3" after create-strapi-starter..
So:
npx create-strapi-starter@3 my-project gatsby-blog
or
yarn create strapi-starter@3 my-project gatsby-blog
Just tested and worked fine.
It fails for me even with v3
Installing strapi/strapi-starter-gatsby-blog starter
- 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: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.0 || ^16.0.0" from [email protected]
npm ERR! node_modules/react-markdown
npm ERR! react-markdown@"^4.3.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!
npm ERR! See C:\Users\xxx\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\xxx\AppData\Local\npm-cache\_logs\2022-01-16T00_44_18_057Z-debug-0.log
at makeError (C:\Users\xxx\AppData\Local\npm-cache\_npx\43e2864cba5bab5b\node_modules\execa\lib\error.js:59:11)
at handlePromise (C:\Users\xxx\AppData\Local\npm-cache\_npx\43e2864cba5bab5b\node_modules\execa\index.js:114:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async installWithLogs (C:\Users\xxx\AppData\Local\npm-cache\_npx\43e2864cba5bab5b\node_modules\create-strapi-starter\utils\build-starter.js:82:3)
at async buildStarter (C:\Users\xxx\AppData\Local\npm-cache\_npx\43e2864cba5bab5b\node_modules\create-strapi-starter\utils\build-starter.js:151:3)
\ Installing dependencies: A complete log of this run can be found in: npm ERR! C:\Users\xxx\AppData\Local\npm-cache\_logs\2022-01-16T00_44_18_057Z-debug-0.log
Just to follow up what @AleCandido kindly linked, to solve it just add a "@3" after create-strapi-starter..
So:
npx create-strapi-starter@3 my-project gatsby-blog
or
yarn create strapi-starter@3 my-project gatsby-blog
Just tested and worked fine.
npx works, but yarn doesn't... ;/
@aimeetacchi which versions of npm and node did you use?
Dont forget to switch to node 14