P. Venkatraman
P. Venkatraman

Reputation: 11

"npm install" does not create node_modules directory or if exists does not copy .node file

package.json

{
  "name" : "abcjs"
  "description" : "Test project"
  "keywords": ["database", "db"],
  "version" : "0.1.0",

  "main": "./abc.js"
}

this uses binding.gyp in the current directory and compiles the project and ./build/Release/abc.node gets created.

But node_modules sub-directory does not get created, or abc.node does not get copied to the node_modules directory.

Any suggestions please?

Thanks, -P. Venkatraman.

Upvotes: 1

Views: 2017

Answers (1)

easywaru
easywaru

Reputation: 1153

You need a "dependencies" option in the package.json file, such as the following:

 "dependencies": {
    "bignumber.js": "1.4.0",
    "readable-stream": "~1.1.13",
    "require-all": "0.0.8"
  },

These dependencies are created in the node_modules sub-folder.

Upvotes: 1

Related Questions