Cannot find module 'winston'-open source projects winstonjs/winston
I wrote a little module that uses winston to log stuff.
I used sudo npm install -g winston
(it is on a vm…so i’m not too concerned with sudo, etc.
Log from npm:
[email protected] /usr/local/lib/node_modules/winston
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
When I try to run my module in node I get:
Error: Cannot find module 'winston'
at Function.Module._resolveFilename (module.js:331:15)
at Function.Module._load (module.js:273:25)
at Module.require (module.js:357:17)
at require (module.js:373:17)
at Object. (/home/name/Code/neon/neon-js-spike/logger.js:2:9)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:349:32)
at Function.Module._load (module.js:305:12)
at Module.require (module.js:357:17)
System versions: ubuntu node -v = v0.11.7-pre npm -v = 1.3.8
P.S. I tried this on my home laptop (another ubuntu vm) and worked.