steven-tey / precedent

An opinionated collection of components, hooks, and utilities for your Next.js project.
https://precedent.dev
MIT License
4.65k stars 406 forks source link

next@13.3.1-canary causing a dependency tree resolution error #47

Open egilll opened 1 year ago

egilll commented 1 year ago

Hi. Following the change in 2d444cf, the default setup instructions (npx create-next-app precedent --example "https://github.com/steven-tey/precedent") no longer work on Node v19.7.0, with the following error showing up:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: precedent@0.1.0
npm ERR! Found: next@13.3.1-canary.11
npm ERR! node_modules/next
npm ERR!   next@"13.3.1-canary.11" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^12.2.5 || ^13" from next-auth@4.22.1

I can bypass the error by going into the folder and yarn install-ing there.

godxtriedcode commented 1 year ago

got same problem

egorkaway commented 8 months ago

same problem and I do not understand how to bypass

egilll commented 8 months ago

@egorkaway, run npx create-next-app precedent --example "https://github.com/steven-tey/precedent", then cd precedent and yarn install, i.e. the solution is to use Yarn instead of Npm.

andriilive commented 7 months ago

@egilll any valuable reason using npx so?

I'd rather sticked to yarn create or other corresponding create-next-app starter

Succed ✅

yarn create next-app --example "https://github.com/steven-tey/precedent" precedent_yarn
pnpm create next-app --example "https://github.com/steven-tey/precedent" precedent_pnpm
bunx create-next-app --example "https://github.com/steven-tey/precedent" precedent_bun

Failed ❌

npx create-next-app --example "https://github.com/steven-tey/precedent" precedent_npx
npx create-next-app@latest --example "https://github.com/steven-tey/precedent" precedent_npx_latest

Console log