When I am running npm run test (mocha), I am getting this message. Using following: npm install --save mocha ganache-cli [email protected] Please advice.
> [email protected] test C:\Smart
> mocha
Error: Cannot find module 'web3'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Smart\test\inbox.test.js:3:14)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at C:\Smart\node_modules\mocha\lib\mocha.js:253:27
at Array.forEach (<anonymous>)
at Mocha.loadFiles (C:\Smart\node_modules\mocha\lib\mocha.js:250:14)
at Mocha.run (C:\Smart\node_modules\mocha\lib\mocha.js:577:10)
at Object.<anonymous> (C:\Smart\node_modules\mocha\bin\_mocha:591:18)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `mocha`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
inbox.test.js
? ie the lines where you to try to require 'web3'.