Error: Cannot find module 'strftime'
nk222 opened this issue · comments
it seems like i cannot instal strftime globally using
npm install -g strftime
it works however when i install it locally. What could be the reason?
It works for me. What's npm version
?
npm: '2.11.3',
modules: '14',
node: '0.12.7',
The install with -g option works fine. Just when I try to use the package with require('strftime') i get the error: Cannot find module 'strftime'
@nk222,
Have you solved your issue?
Probably you don't need to install strftime
globally. strftime
doesn't provide CLI so there's no need to have it globally. More info on nodejs.org
Basically your have two ways to manage packages in your project.
- Install them locally using
npm install strftime
- Add them to
package.json
file as dependencies and thennpm install
to install all listed packages.
There's one more option to link the global package to local one usingnpm link strftime
. But i don't quite like it.
Did it help?
I'm closing the issue. Feel free to reopen if the problem isn't solved.
Thanks! I just installed it locally and everything was fine ;)