简体   繁体   中英

Error: Cannot find module 'web3' when trying to use web3.js from Node

internal/modules/cjs/loader.js:1032 throw err; ^

Error: Cannot find module 'web3'

I am getting this error when i am entering command node filename.js in terminal of visual studiocode. and when i run (Ctrl+f5) then google chrome opens blank.

Any suggestions will be helpful. Thanks

Have you installed web3.js? You can install it by using

npm install web3

if you have done it then please provide the code so i can check it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM