pbteja1998 / remix-auth-email-link

MIT License
92 stars 22 forks source link

Unable to `npm install` or `yarn install` from a fresh repo clone: unable to resolve dependency tree error #21

Closed ericallam closed 2 years ago

ericallam commented 2 years ago

Describe the bug

After cloning the repo locally and running npm install there is the following error:

npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: remix-auth-email-link@1.4.2
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   dev react@"^17.0.2" from the root project
npm ERR!   peer react@">=16.8" from @remix-run/react@1.1.1
npm ERR!   node_modules/@remix-run/react
npm ERR!     dev @remix-run/react@"^1.1.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.2.0" from react-dom@18.2.0
npm ERR! node_modules/react-dom
npm ERR!   peer react-dom@">=16.8" from @remix-run/react@1.1.1
npm ERR!   node_modules/@remix-run/react
npm ERR!     dev @remix-run/react@"^1.1.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.

Your Example Website or App

https://github.com/pbteja1998/remix-auth-email-link

Steps to Reproduce the Bug or Issue

  1. Clone the repo
  2. Navigate to the root of the repo
  3. Run npm install

Expected behavior

It should install the dependencies without having to use the --legacy-peer-deps option

Screenshots or Videos

No response

Platform

Additional context

No response

ericallam commented 2 years ago

It seems like maybe CONTRIBUTING.md is wrong, as there is a yarn.lock file in the repository. However, yarn install also does not work:

remix-auth-email-link $ yarn install
➤ YN0000: ┌ Resolution step
➤ YN0061: │ core-js-pure@npm:3.20.0 is deprecated: core-js-pure@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js-pure.
➤ YN0002: │ @remix-run/node@npm:1.1.1 doesn't provide react (pd7c86), requested by @remix-run/server-runtime
➤ YN0002: │ @remix-run/node@npm:1.1.1 doesn't provide react-dom (p8ebb9), requested by @remix-run/server-runtime
➤ YN0002: │ remix-auth-email-link@workspace:. doesn't provide @types/node (p8b045), requested by ts-node
➤ YN0002: │ remix-auth-email-link@workspace:. doesn't provide react-dom (p10da8), requested by @remix-run/react
➤ YN0002: │ remix-auth-email-link@workspace:. doesn't provide react-dom (pc96f6), requested by @remix-run/server-runtime
➤ YN0002: │ remix-auth@npm:3.2.1 [9cae8] doesn't provide react (p5c2bb), requested by remix-utils
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 3s 875ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ wrappy@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yallist@npm:4.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yaml@npm:1.10.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yn@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ typescript@npm:4.5.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0066: │ typescript@patch:typescript@npm%3A4.5.4#builtin<compat/typescript>::version=4.5.4&hash=8133ad: Cannot apply hunk #2 (set enableInlineHunks for details)
➤ YN0000: └ Completed in 1s 9ms
➤ YN0000: Failed with errors in 4s 887ms
pbteja1998 commented 2 years ago

Can you clone it again once and run yarn install

ericallam commented 2 years ago

Just tried and received the same error. I'm using yarn 2.4.3

pbteja1998 commented 2 years ago

I’m away from my computer right now. Can check when I’m back. But it should work. Don’t know why it isn’t.

Are you sure you cloned it again, because I added 2 more commits after your comment.

ericallam commented 2 years ago

Yup just cloned it fresh again and still the same thing:

CleanShot 2022-10-11 at 10 21 25@2x
pbteja1998 commented 2 years ago

I just tried it locally from my side. Everything is working. So there must be some problem from your side.

pbteja1998 commented 2 years ago

You can even go to https://gitpod.io and enter this repo link. You can see that yarn install works perfectly.

ericallam commented 2 years ago

What version of yarn are you using?

ericallam commented 2 years ago

yarn 1.22.19 works just fine 👍