Description
Description
Issue Summary:
-
Slow Installation:
-
Initially attempted to install all required packages (
near-api-js
,@near-wallet-selector/core
,@near-wallet-selector/my-near-wallet
,@near-wallet-selector/ledger
,@near-wallet-selector/modal-ui
) together:npm install near-api-js @near-wallet-selector/core @near-wallet-selector/my-near-wallet @near-wallet-selector/ledger @near-wallet-selector/modal-ui
-
- The installation process was extremely slow and never completed successfully on both WSL and macOS.
-
Error When Installing Individually:
-
Decided to install the packages one by one to diagnose the issue. Encountered a dependency conflict when installing
@near-wallet-selector/core
:npm install @near-wallet-selector/core
-
The error indicates a conflict between
[email protected]
and the peer dependency required by@near-wallet-selector/core
([email protected]
).
-
Steps to Reproduce:
-
Create a new Next.js application:
npx create-next-app@latest my-app cd my-app
-
Attempt to install all packages together:
npm install near-api-js @near-wallet-selector/core @near-wallet-selector/my-near-wallet @near-wallet-selector/ledger @near-wallet-selector/modal-ui
- Observe slow installation and failure.
-
Try installing the packages one by one:
npm install near-api-js npm install @near-wallet-selector/core
- Encounter the following error when installing
@near-wallet-selector/core
:
- Encounter the following error when installing
Error Log:
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/near-api-js
npm ERR! near-api-js@"^5.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer near-api-js@"4.0.3" from @near-wallet-selector/[email protected]
npm ERR! node_modules/@near-wallet-selector/core
npm ERR! @near-wallet-selector/core@"^8.9.15" from the root project
Environment:
- OS: WSL 2 and macOS Monterey
- Node.js: 22.12.0
- Packages:
[email protected]
@near-wallet-selector/[email protected]
Page URL
https://docs.near.org/build/web3-apps/integrate-contracts
Impact
- Incorrect information
- Missing information
- Unclear explanation
- Broken link
- Code example doesn't work
- Other (please specify in description)
Suggested Fix
Suggestions:
-
Update Documentation:
-
Specify compatible versions of
near-api-js
and@near-wallet-selector/core
. Example:npm install [email protected] @near-wallet-selector/core
-
Provide guidance for resolving dependency issues using
--legacy-peer-deps
or--force
.
-
-
Improve Package Compatibility:
- Update
@near-wallet-selector/core
to support the latest version ofnear-api-js
(5.0.1
).
- Update
Metadata
Assignees
Labels
Type
Projects
Status
No status
Status
In Progress 🏗️