I just created a node_module with a dependency with 'validator'. But when I install it from npm, it doesn't install the 'validator' module in its own node_module directory. I don't understand why, but it's the first time I create my own node module.
package.json:
{ "name": "validator-extended", "description": "String validation and sanitization based on validator.js", "version": "1.1.0", "homepage": "https://github.com/Ayolan/validator-extended", "keywords": [ "validator", "validation", "validate", "sanitization", "sanitize", "sanitisation", "sanitise", "assert", "extend", "extended" ], "author": "Vadorequest <https://github.com/Vadorequest>", "main": "app.js", "bugs": { "url": "https://github.com/Ayolan/validator-extended/issues" }, "repository": { "type": "git", "url": "https://github.com/Ayolan/validator-extended.git" }, "engines": { "node": ">= 0.8" }, "licenses": [ { "type": "MIT", "url": "https://github.com/Ayolan/validator-extended/raw/master/LICENSE" } ], "dependencies": { "validator": "~3.1" } } I also have a .npmignore file with this:
######################## # node.js / npm ######################## lib-cov *.seed *.log *.csv *.dat *.out *.pid *.gz pids logs results node_modules npm-debug.log ######################## # misc / editors ######################## *~ *# .DS_STORE .netbeans nbproject .idea Should I push the node_modules/ directory into my git repository?