Web3.js: Can't install web3 with yarn

Created on 23 Sep 2017  Β·  22Comments  Β·  Source: ChainSafe/web3.js

Hi, I'm having some problems installing web3 with Yarn

I'm using Yarn 1.0.2 and Node 8.5.0

╰─○ yarn add web3                                                                                                                                 
yarn add v1.0.2                                                                                                                                   
[1/4] Resolving packages...                                                                                                                       
Couldn't find any versions for "web3-net" that matches "^1.1.0"          
? Please choose a version of "web3-net" from this list: (Use arrow keys) 
❯ 1.0.0-beta.21                     
  1.0.0-beta.20                     
  1.0.0-beta.19                     
  1.0.0-beta.18                     
  1.0.0-beta.17                     
  1.0.0-beta.16                     
  1.0.0-beta.15                     
  1.0.0-beta.14                     
  1.0.0-beta.13                     
  1.0.0-beta.12                     
  1.0.0-beta.11                     
  1.0.0-beta.10                     
  1.0.0-beta.9                      
  1.0.0-beta.8                      
Couldn't find any versions for "web3-utils" that matches "^1.1.0"        
? Please choose a version of "web3-utils" from this list: (Use arrow keys) 
❯ 1.0.0-beta.21                     
  1.0.0-beta.20                     
  1.0.0-beta.19                     
  1.0.0-beta.17                     
  1.0.0-beta.16                     
  1.0.0-beta.15                     
  1.0.0-beta.14                     
  1.0.0-beta.13                     
  1.0.0-beta.12                     
  1.0.0-beta.11                     
  1.0.0-beta.10                     
  1.0.0-beta.9                      
  1.0.0-beta.8                      
warning [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
error Couldn't find package "web3-core-promiEvent" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Couldn't find package "web3-requestManager" on the "npm" registry.
    at /usr/lib/node_modules/yarn/lib/cli.js:48173:15
    at Generator.next (<anonymous>)
    at step (/usr/lib/node_modules/yarn/lib/cli.js:92:30)
    at /usr/lib/node_modules/yarn/lib/cli.js:103:13
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Most helpful comment

workaround... yarn add web3@^0.19.0

All 22 comments

related to #994

This is due to a bug in yarn where it resolves the lerna-tmp tag and not the latest. https://github.com/yarnpkg/yarn/issues/4208

I can't find any lerna-tmp in the 1.0 branch of the repo.

@frozeman

run npm info web3-core and it is listed

  'dist-tags': { 'lerna-temp': '1.1.0', latest: '1.0.0-beta.21' },

yarn add web3@beta let me pick. note sure if this is wise to do.

I removed the distilled tag. This was added by a person who accidentally released web3-core under his name, before i ever published it. I had to contact quite a few people to get this repo under my control :P back then. I now removed the tag, please let me know if it solves your issues.

Same issue here

Same here

Same issue here too.

Same issue here

workaround... yarn add web3@^0.19.0

same prob

@frozeman Still not working with yarn.

Couldn't find any versions for "web3-utils" that matches "^1.1.0"

I tried the previous versions and 1.0.0-beta.20 is the last that works.

There is a pending PR that should fix this issue. The problem is that
npm and yarn resolve semver differently. The fix is to pin web3’s
dependencies to it’s sub-packages with exact version numbers, rather than
compatibility version numbers.

@frozeman β€” if you need anything else done on that PR, please let me know.

-David

On October 25, 2017 at 3:49:29 AM, Antoni KΔ™dracki ([email protected])
wrote:

@frozeman https://github.com/frozeman Still not working with yarn.

Couldn't find any versions for "web3-utils" that matches "^1.1.0"

β€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ethereum/web3.js/issues/1070#issuecomment-339290830,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA60g4yfmn32e5oOkPxChFemhC4YBPJjks5svxI5gaJpZM4PhUhx
.

Same issue here with web3-utils

What error are you seeing exactly?

Here's what I currently get:

Node 4.8.4, Yarn 1.32

yarn add web3-utils
```yarn add v1.3.2
[1/4] πŸ” Resolving packages...
[2/4] 🚚 Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=6.5.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Node 6.11.5, Yarn 1.32

`yarn add web3-utils`

yarn add v1.3.2
[1/4] πŸ” Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] πŸ”— Linking dependencies...
[4/4] πŸ“ƒ Building fresh packages...
success Saved 1 new dependency.
└─ [email protected]
✨ Done in 4.12s.
```

Samesies

It's not happening anymore. Using Yarn 1.3.2 and Node 9.4.0

Was having issues previously on yarn version 1.2.1 and node v9.6.1. Upgraded yarn to 1.5.1 and was able to get web3 installed without issue. Just adding another confirmation that the issue appears solved with latest versions

still the same problem

@frozeman can you please provide some help?

If you are still facing the problem use yarn add web3@^0.19.0

yarn add web3@beta worked and so did yarn add [email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zamoore picture zamoore  Β·  3Comments

gabmontes picture gabmontes  Β·  3Comments

dzarezenko picture dzarezenko  Β·  3Comments

praveengupta0895 picture praveengupta0895  Β·  3Comments

nivida picture nivida  Β·  3Comments