I implemented a npm module (called wrench) in an application which I always tested locally. That worked always without problems. Then I was trying to install wrench on my server.
npm install wrench
did work as expected but as soon as it comes to require("wrench")
, I get the following error:
> require("wrench")
Error: Cannot find module 'wrench'
at Function._resolveFilename (module.js:320:11)
at Function._load (module.js:266:25)
at require (module.js:348:19)
at [object Context]:1:1
at Interface.<anonymous> (repl.js:171:22)
at Interface.emit (events.js:64:17)
at Interface._onLine (readline.js:153:10)
at Interface._line (readline.js:408:8)
at Interface._ttyWrite (readline.js:585:14)
at ReadStream.<anonymous> (readline.js:73:12)
If I run npm ls
I can see
wrench@0.1.0
Is there something I am missing here?
Thanks,
Elias
I believe
npm ls
shows all the the packages available on npm. To see the installed packages I think you should issuenpm ls installed
.I have:
I issue:
My advice is to use the latest and greatest npm and node.js and try again.