Basic question on adding a module to a project

Just starting with WebStorm & node.js, so please forgive my ignorance...

I've got a "HelloWorld" program up and running in the debugger (Windows).

Now I want to add a third-party node module (call it "freddy"), I can download the source from github, and I can then put it into my project under ./node_modules directory.

However, when I run, it can't be found

module.js:340
    throw err;
          ^
Error: Cannot find module 'freddy'



I tried adding
NODE_PATH C:\Projects\node\hello2\node_modules


to environment variables.

But that didn't seem to help.

I'm sure it's something really obvious...

1 comment

...I see that other (working) modules have stuff in the node_modules/.bin directory which my module, freddy, does not.

0

Please sign in to leave a comment.