node.js - Cannot find module (nodejs) -
node.js - Cannot find module (nodejs) -
module: getmac https://www.npmjs.org/package/getmac
backstory: using module getmac before , worked charm. time ago updated nodejs 0.11. , today tried utilize again. installed (npm install mac) tried use. nope. "cannot find module". see getmac folder in node_modules. npm ls
shows:
├─┬ getmac@1.0.6 │ └─┬ extract-opts@2.2.0 │ └── typechecker@2.0.8
i using 20+ other modules without problems.
os: windows 7 32bit, administrator account
how test if work: of possibility project can issue:
i created new folder. then open command line , use:npm install getmac
i created test.js
1 line: require('getmac');
in command line: nodejs test.js
every time result same:
module.js:340 throw err; ^ error: cannot find module 'getmac' @ function.module._resolvefilename (module.js:338:15) @ function.module._load (module.js:280:25) @ module.require (module.js:364:17) @ require (module.js:380:17) @ object.<anonymous> (c:\users\nfq\testo\test.js:1:63) @ module._compile (module.js:456:26) @ object.module._extensions..js (module.js:474:10) @ module.load (module.js:356:32) @ function.module._load (module.js:312:12) @ function.module.runmain (module.js:497:10)
others modules works fine
what tried:
npm install getmac (no errors occurred) npm remove/uninstall getmac , install again npm -g install getmacrequire('./node_modules/getmac')
install manually downloaded module different versions 1.04/1.0.5/1.0.6 node 0.11.13/0.10.32/0.10.25/0.8.27/ install in program files/nodejs/node_modules
delete files in %appdata%/npm/
delete files in program files/nodejs/node_modules
reboot computer several times at virtual machine works cli error sublimetext2:
[8036:1014/141615:info:console(293)] "{"stack":"error: cannot find module 'getmac'\n @ function.module._resolvefilename (module.js:334:15)\n "uncaught error: cannot find module 'getmac'", source: module.js (336)
file construction of folder node_modules/getmac:
c:\users\nfq\testo\node_modules\getmac - .npmignore - history.md - license.md - package.json - readme.md - +¦¦¦bin - getmac-node - l¦¦¦node_modules l¦¦¦extract-opts - .npmignore - example.js - license.md - package.json - readme.md - +¦¦¦node_modules - l¦¦¦typechecker - - .npmignore - - cyclic.js - - history.md - - license.md - - package.json - - readme.md - - - l¦¦¦out - l¦¦¦lib - typechecker.js - l¦¦¦out l¦¦¦lib extract-opts.js
please help me.
remove node_modules
folder, run npm cache clean
reinstall packages npm install
.
node.js
Comments
Post a Comment