Reputation: 3320
I want to install this module: node-poormansmysql.
My nodejs application is installed in C:\Program Files\NodeJS\
.
I have here the folder - node_modules.
Here I added a folder - node-poormansmysql. In this folder I copied the content from github.
I still have the error - Can not find module - node-poormansmysql
Where am I going wrong?
Upvotes: 0
Views: 427
Reputation: 96
Try to copy to C:\Users\{username}\node_modules
Or just type in cmd "C:\Program Files\NodeJS\npm.cmd" install node-poormansmysql
Upvotes: 2
Reputation: 2734
The problem is that node will look for an index.js in the folder (or a package.json) and this library have not been packaged as a module. So what you need to do is re-name node-poormansmysql.js to index.js Also make sure you get all the dependencies.
Upvotes: 0