Closed dylanseago closed 4 years ago
Same problem here.
Cannot find module 'websocket'
I think web3js should fix that on the CI since it looks like each few releases break stuff.
On my projects I use dependency-check which would have prevented this error.
Also getting errors due to scrypt-shym
not being installed.
$ node --version
v10.16.3
$ npm --version
6.11.3
There's a hotfix for this queued up..
@pubkey Have added dependency-check to CI per your suggestion, thanks for that idea.
NB: This was auto-closed by GitHub...fixes are not published yet.
Leaving a couple autopsy notes - very disappointed the existing tests did not catch this.
require
is able to resolve outwards until it fails. Same issue
Same here when installing drizzle library node -v 12.13.0 npm -v 6.12.0
I apologize for all the trouble you all probably had. We have just released a fix with version 1.2.4
of web3.js.
not working for me still after a full rm -rf node_modules && yarn install
Failed to compile.
./node_modules/web3-eth-accounts/src/index.js
Module not found: Can't resolve 'scrypt-shim' in 'node_modules/web3-eth-accounts/src'
$ node -v
v10.13.0
$ npm -v
6.11.3
$ npm ls | grep web3
└─┬ web3@1.2.4
├─┬ web3-bzz@1.2.4
├─┬ web3-core@1.2.4
│ ├─┬ web3-core-helpers@1.2.4
│ │ ├── web3-eth-iban@1.2.4 deduped
│ │ └── web3-utils@1.2.4 deduped
│ ├─┬ web3-core-method@1.2.4
│ │ ├── web3-core-helpers@1.2.4 deduped
│ │ ├─┬ web3-core-promievent@1.2.4
│ │ ├── web3-core-subscriptions@1.2.4 deduped
│ │ └── web3-utils@1.2.4 deduped
│ ├─┬ web3-core-requestmanager@1.2.4
│ │ ├── web3-core-helpers@1.2.4 deduped
│ │ ├─┬ web3-providers-http@1.2.4
│ │ │ ├── web3-core-helpers@1.2.4 deduped
│ │ ├─┬ web3-providers-ipc@1.2.4
│ │ │ └── web3-core-helpers@1.2.4 deduped
│ │ └─┬ web3-providers-ws@1.2.4
│ │ ├─┬ @web3-js/websocket@1.0.30
│ │ └── web3-core-helpers@1.2.4 deduped
│ └── web3-utils@1.2.4 deduped
├─┬ web3-eth@1.2.4
│ ├── web3-core@1.2.4 deduped
│ ├── web3-core-helpers@1.2.4 deduped
│ ├── web3-core-method@1.2.4 deduped
│ ├─┬ web3-core-subscriptions@1.2.4
│ │ └── web3-core-helpers@1.2.4 deduped
│ ├─┬ web3-eth-abi@1.2.4
│ │ └── web3-utils@1.2.4 deduped
│ ├─┬ web3-eth-accounts@1.2.4
│ │ ├─┬ @web3-js/scrypt-shim@0.1.0
│ │ ├── web3-core@1.2.4 deduped
│ │ ├── web3-core-helpers@1.2.4 deduped
│ │ ├── web3-core-method@1.2.4 deduped
│ │ └── web3-utils@1.2.4 deduped
│ ├─┬ web3-eth-contract@1.2.4
│ │ ├── web3-core@1.2.4 deduped
│ │ ├── web3-core-helpers@1.2.4 deduped
│ │ ├── web3-core-method@1.2.4 deduped
│ │ ├── web3-core-promievent@1.2.4 deduped
│ │ ├── web3-core-subscriptions@1.2.4 deduped
│ │ ├── web3-eth-abi@1.2.4 deduped
│ │ └── web3-utils@1.2.4 deduped
│ ├─┬ web3-eth-ens@1.2.4
│ │ ├── web3-core@1.2.4 deduped
│ │ ├── web3-core-helpers@1.2.4 deduped
│ │ ├── web3-core-promievent@1.2.4 deduped
│ │ ├── web3-eth-abi@1.2.4 deduped
│ │ ├── web3-eth-contract@1.2.4 deduped
│ │ └── web3-utils@1.2.4 deduped
│ ├─┬ web3-eth-iban@1.2.4
│ │ └── web3-utils@1.2.4 deduped
│ ├── web3-eth-personal@1.2.4 deduped
│ ├── web3-net@1.2.4 deduped
│ └── web3-utils@1.2.4 deduped
├─┬ web3-eth-personal@1.2.4
│ ├── web3-core@1.2.4 deduped
│ ├── web3-core-helpers@1.2.4 deduped
│ ├── web3-core-method@1.2.4 deduped
│ ├── web3-net@1.2.4 deduped
│ └── web3-utils@1.2.4 deduped
├─┬ web3-net@1.2.4
│ ├── web3-core@1.2.4 deduped
│ ├── web3-core-method@1.2.4 deduped
│ └── web3-utils@1.2.4 deduped
├─┬ web3-shh@1.2.4
│ ├── web3-core@1.2.4 deduped
│ ├── web3-core-method@1.2.4 deduped
│ ├── web3-core-subscriptions@1.2.4 deduped
│ └── web3-net@1.2.4 deduped
└─┬ web3-utils@1.2.4
1.2.4 still not works:
npm i
npm WARN deprecated core-js@2.6.10: core-js@<3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/scrypt-shim - Not found
npm ERR! 404
npm ERR! 404 'scrypt-shim@0.1.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/k06a/.npm/_logs/2019-11-20T08_14_08_163Z-debug.log
This got definitely fixed with 1.2.4. Have you tried to remove your package-lock
files and to do a clean install @k06a?
@nivida removing package-lock
helped 👍
@k06a Great! Thanks for your feedback!
It appears that two packages have been changed to use the
@web3-js
scope but the corresponding imports weren't updated.web3-eth-accounts
requiresscrypt-shim
inindex.js
but inpackage.json
depends on@web3-js/scrypt-shim
web-providers-ws
requireswebsocket
inindex.js
butpackage.json
depends on@web3-js/websocket
Build error emitted by our webpack:
Steps to reproduce the behavior
Versions
Node v12.13.0 npm v6.13.0 web3.js v1.2.3