Reputation: 71
Module: getmac https://www.npmjs.org/package/getmac
Backstory:
I was using module getmac before and it worked like a charm. Some time ago I updated nodejs to 0.11. And today I tried to use it again. I installed it (npm install get mac) Tried it to use. Nope. "Cannot find module".
I see getmac folder in node_modules.
Npm ls
shows:
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
I am using like 20+ other modules without any problems.
OS: Windows 7 32bit, administrator account
How I test if it work: Of possibility that my project can be the issue:
npm install getmac
test.js
with one line: require('getmac');
nodejs test.js
Every time result is the same:
module.js:340
throw err;
^
Error: Cannot find module 'getmac'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (C:\Users\Nfq\testo\test.js:1:63)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
Others modules works fine
What I tried:
require('./node_modules/getmac')
program files/nodejs/node_modules
%appdata%/npm/
program files/nodejs/node_modules
error from sublimetext2:
[8036:1014/141615:INFO:CONSOLE(293)] "{"stack":"Error: Cannot find module 'getmac'\n at Function.Module._resolveFilename (module.js:334:15)\n
"Uncaught Error: Cannot find module 'getmac'", source: module.js (336)
File structure 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.
Upvotes: 3
Views: 4507
Reputation: 3152
Remove the node_modules
folder, run npm cache clean
then reinstall the packages npm install
.
Upvotes: 4