samsonjs / strftime

strftime for JavaScript

Home Page:http://samhuri.net/projects/strftime

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Cannot find module 'strftime'

nk222 opened this issue · comments

commented

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?

commented

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.

  1. Install them locally using npm install strftime
  2. Add them to package.json file as dependencies and then npm install to install all listed packages.
    There's one more option to link the global package to local one using npm 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.

commented

Thanks! I just installed it locally and everything was fine ;)