Closed dmihal closed 4 years ago
He @dmihal ! Thanks for reporting the issue. I am a bit confused. You mentioned webpack a couple times in your post but test-env
doesn't use webpack at all. Do you mean web3 library instead?
Thanks @ylv-io, that seems to be a typo on my part. I've changed it to web3.
Hi @dmihal! I’m sorry that you had this issue. We would need more information so that we can reproduce it.
Can you advise the operating system, node and npm versions that you are using? Any other details that might help us reproduce it would be appreciated!
I tried reproducing with a simple environment on WSL2 but didn't get any errors. This was also reported by another community member in the community forum: https://forum.openzeppelin.com/t/cannot-find-module-scrypt-shim-when-using-openzeppelin-test-environment/3147
Update
I have been able to reproduce this issue by following these steps: Using node v11.15.0 with truffle and OpenZeppelin Test Environment installed tests fail with Cannot find module 'scrypt-shim'
$ npm run test
> issue126@1.0.0 test /home/abcoathup/projects/forum/issue126
> mocha --exit --recursive test
Error: Cannot find module 'scrypt-shim'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
at Function.Module._load (internal/modules/cjs/loader.js:591:27)
at Module.require (internal/modules/cjs/loader.js:723:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object.<anonymous> (/home/abcoathup/projects/forum/issue126/node_modules/web3/node_modules/web3-eth-accounts/src/index.js:34:14)
...
Thanks so much for reporting it! The project owner will review and triage this issue as soon as they can. In the meantime, you can try the following workaround:
Change to use node 10
Need to remove node_modules
and package-lock.json
before running npm install
again
Can this issue be reproduced in Node 10 or 12?
I wasn't able to reproduce in node v10.21.0 or node v12.18.2 I could only reproduce in node 11 which is no longer a node supported release.
Okay. Thank you! Closing this issue then.
Hi, I am getting the same error. Node v10.15.3 Any fix yet
Having the same issue with Node v10.6.0
@lyledavids @arsenyjin Can you try upgrading your Node version to 10.21.0
?
When I try to run my tests, i get this:
Error: Cannot find module 'scrypt-shim'
This appears to come from web3: ethereum/web3.js#3210
This library has a fixed webpack version 1.2.2. Updating the version or making it a peer dependency should resolve this issues.