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

Installation with npm fails, add a section in the docs #58

Closed
wants to merge 1 commit into from

Conversation

remarcable
Copy link

Following the Local Testing instructions using npm instead of yarn doesn't work because of dependency mismatches.

This PR adds a paragraph for steps with a workaround.

Copy link
Collaborator

@bh2smith bh2smith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your proposed suggestion. This does indeed resolve the dependency issues encountered when trying to install with npm. Although this is more of a band-aid.

from the error logs
➜  near-ca git:(main) ✗ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @near-wallet-selector/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/near-api-js
npm ERR!   near-api-js@"^3.0.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer near-api-js@"^1.0.0 || ^2.0.0" from @near-wallet-selector/[email protected]
npm ERR! node_modules/@near-wallet-selector/core
npm ERR!   @near-wallet-selector/core@"^8.9.5" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/near-api-js
npm ERR!   peer near-api-js@"^1.0.0 || ^2.0.0" from @near-wallet-selector/[email protected]
npm ERR!   node_modules/@near-wallet-selector/core
npm ERR!     @near-wallet-selector/core@"^8.9.5" 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! 
npm ERR! For a full report see:
npm ERR! /Users/bh2smith/.npm/_logs/2024-05-27T12_46_45_001Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /Users/bh2smith/.npm/_logs/2024-05-27T12_46_45_001Z-debug-0.log

we see that there is only one conflicting dependency (with https://www.npmjs.com/package/@near-wallet-selector/core)

It would be good to reference an existing open issue to the conflicting dependency (like this) or really get the ball moving by actually upgrading that package's peer dependencies.

As it stands, since the README explicitly instructs the user to use yarn, I think that the current error logs provided by npm(about appending --force) to your installation command are sufficient and this proposed change doesn't really belong here.

@bh2smith bh2smith closed this May 27, 2024
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

Successfully merging this pull request may close these issues.

2 participants