It appears that two packages have been changed to use the @web3-js scope but the corresponding imports weren't updated.
web3-eth-accounts requires scrypt-shim in index.js but in package.json depends on @web3-js/scrypt-shimweb-providers-ws requires websocket in index.js but package.json depends on @web3-js/websocketBuild error emitted by our webpack:
ERROR in ./node_modules/web3-eth-accounts/src/index.js
Module not found: Error: Can't resolve 'scrypt-shim' in '/Users/dylan/dev/ba/faast-web/node_modules/web3-eth-accounts/src'
@ ./node_modules/web3-eth-accounts/src/index.js 34:13-35
@ ./node_modules/web3-eth/src/index.js
@ ./node_modules/web3/src/index.js
[...]
ERROR in ./node_modules/web3-providers-ws/src/index.js
Module not found: Error: Can't resolve 'websocket' in '/Users/dylan/dev/ba/faast-web/node_modules/web3-providers-ws/src'
@ ./node_modules/web3-providers-ws/src/index.js 27:9-29
@ ./node_modules/web3-core-requestmanager/src/index.js
@ ./node_modules/web3-core/src/index.js
@ ./node_modules/web3-eth-personal/src/index.js
@ ./node_modules/web3/src/index.js
[...]
git clone [email protected]:go-faast/faast-web.git
cd faast-web
git checkout web3-v123-issue
npm install
npm run build:app
Node v12.13.0
npm v6.13.0
web3.js v1.2.3
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
โโโฌ [email protected]
โโโฌ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โโโฌ [email protected]
โ โ โโโ [email protected] deduped
โ โ โโโฌ [email protected]
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โโโฌ [email protected]
โ โ โโโ [email protected] deduped
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected] deduped
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected] deduped
โ โ โโโฌ [email protected]
โ โ โโโฌ @web3-js/[email protected]
โ โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โโโฌ [email protected]
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โ โโโฌ [email protected]
โ โ โโโ [email protected] deduped
โ โโโฌ [email protected]
โ โ โโโ [email protected] deduped
โ โโโฌ [email protected]
โ โ โโโฌ @web3-js/[email protected]
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โโโฌ [email protected]
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โโโฌ [email protected]
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โ โโโ [email protected] deduped
โ โโโฌ [email protected]
โ โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โโโฌ [email protected]
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โโโฌ [email protected]
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โโโฌ [email protected]
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โ โโโ [email protected] deduped
โโโฌ [email protected]
1.2.4 still not works:
npm i
npm WARN deprecated [email protected]: 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 '[email protected]' 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!
Most helpful comment
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.