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

Solana web3.js is not getting installed #3252

Closed
0xCipherCoder opened this issue Sep 14, 2024 · 4 comments
Closed

Solana web3.js is not getting installed #3252

0xCipherCoder opened this issue Sep 14, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@0xCipherCoder
Copy link

Overview

I have been trying to install Solana web3.js but it's not getting installed. I tried with both npm and yarn.

Steps to reproduce

Try using the below command for npm -

npm install --save @solana/web3.js

This command gets stuck, doesn't progress, and no output is shown.

(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠧ idealTree:anchor-rpg: sill idealTree buildDeps
(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠧ idealTree:anchor-rpg: sill idealTree buildDeps
(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠏ idealTree:anchor-rpg: sill idealTree buildDeps
(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠏ idealTree:anchor-rpg: sill idealTree buildDeps
(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠸ idealTree:anchor-rpg: sill idealTree buildDeps

Try using the below command for yarn -

yarn add @solana/web3.js

It gives the following output -

[1/4] Resolving packages...
⠁ (node:2965134) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.78.4.tgz: certificate is not yet valid".

Description of bug

Node version - v21.7.1
yarn Version - 1.22.19
npm Version - 10.5.0

@0xCipherCoder 0xCipherCoder added the bug Something isn't working label Sep 14, 2024
@buffalojoec
Copy link
Collaborator

Strange, it doesn't look like we ever published a version for 1.78.4. I'm not sure where Yarn is getting that patch version from.
https://www.npmjs.com/package/@solana/web3.js?activeTab=versions

I just tried to reproduce, and I have no issues installing it, however NPM version 10.2.3 installs @solana/web3.js version 1.95.3 (latest v1 release) on a completely empty repository.

I think it's probably more helpful if you share some context like a package.json, but this seems to me like your local setup is caching that erroneous version somewhere, for some reason.

@0xCipherCoder
Copy link
Author

Please find below a package.json file. This is version published as I see in the version list. I initially was trying to install the helpers package but that got stuck due to the web3.js package and then I tried to install that independently. But the same issue is faced. I tried with multiple versions but npm gets stuck and yarn can produce the above output.

Example command tried -

npm install @solana/[email protected]
{
  "scripts": {
    "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
    "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
  },
  "dependencies": {
    "@coral-xyz/anchor": "^0.30.1"
  },
  "devDependencies": {
    "@types/bn.js": "^5.1.0",
    "@types/chai": "^4.3.0",
    "@types/mocha": "^9.1.1",
    "chai": "^4.3.4",
    "mocha": "^9.2.2",
    "prettier": "^2.6.2",
    "ts-mocha": "^10.0.0",
    "typescript": "^4.3.5"
  }
}

@0xCipherCoder
Copy link
Author

This looks like a local issue running WSL Ubuntu as after restarting the system it started working.

Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants