I'm using npm v1.4.4 and node v0.10.25 on Mac OS X 10.9.2.
I've recently upgraded node and npm, and now npm install is no longer creating the .bin directory in node_modules.
I've deleted node_modules, tried npm install again, but the directory and binaries are never created.
Does anybody have any ideas as to why this is happening?
Here is my package.json:
{ "name": "redacted", "author": {}, "description": "redacted", "dependencies": { }, "devDependencies": { "karma": "*", "karma-coverage": "0.1.2", "karma-junit-reporter": "*", "karma-coffee-preprocessor": "~0.1", "grunt": "^0.4.2", "grunt-contrib-requirejs": "^0.4.3", "grunt-contrib-concat": "^0.3.0", "grunt-contrib-sass": "^0.7.2", "grunt-contrib-htmlmin": "^0.2.0", "grunt-contrib-cssmin": "^0.7.0", "grunt-contrib-coffee": "^0.10.1", "grunt-contrib-uglify": "^0.3.3", "grunt-contrib-jst": "^0.5.1", "grunt-contrib-qunit": "^0.4.0", "grunt-contrib-jshint": "^0.8.0", "grunt-contrib-watch": "^0.5.3", "grunt-contrib-jasmine": "^0.6.1", "grunt-contrib-compress": "^0.6.1", "grunt-contrib-handlebars": "^0.6.1", "grunt-contrib-less": "^0.9.0", "grunt-contrib": "^0.9.0" } }
The command npm bin lets you find out where the closest executables are: $ npm bin /tmp/node_modules/.bin.
The directory node_modules/.bin is where the binaries of the modules used by your project are stored, normally using symbolic links to the respective binaries in the corresponding module's directory.
npm install doesn't create node_modules directory.
The -D flag is the shortcut for: --save-dev . Source: https://docs.npmjs.com/cli/install. -D, --save-dev: Package will appear in your devDependencies. Follow this answer to receive notifications.
I know this is an old post but I experienced the same issue recently. I had copied files from an existing project including package.json and package-lock.json. The package-lock.json was what prevented the node_module/.bin directory from being created. The solution was to delete the node_modules directory and package-lock.json and run npm install again
Seems that all your dependencies are dev dependencies. Could you see if your NODE_ENV environment variable is set to production now? If yes you will need to change it back.
Also, any error happened during installation?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With