Reputation: 757
noob question regarding Node and npm: I have a package.json file with a list of dependancies that I want to install with npm install. When I run the command, nothing happens, I don't even receive an error, nothing at all :( But if I try to install a single package from the list, it works perfectly... I haven't created the package.json myself, so I am not sure what the "proxyURL" thing does...
{
"name": "dss",
"version": "0.0.0",
"repository": {
"type": "git",
"url": "*urlofmyrepo*"
},
"dependencies": {
"bower": "^1.7.7",
"cssmin": "^0.4.3",
"gulp": "^3.9.0",
"gulp-batch": "^1.0.5",
"gulp-concat": "^2.6.0",
"gulp-if": "^2.0.0",
"gulp-jshint": "^2.0.0",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.2.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-strip-debug": "^1.1.0",
"gulp-uglify": "^1.5.1",
"gulp-util": "^3.0.7",
"gulp-watch": "^4.3.5",
"jshint": "^2.9.1",
"lodash": "^4.2.1",
"minimatch": "^3.0.0",
"sass": "^0.5.0",
"uglifyjs": "^2.4.10",
"underscore": "^1.8.3",
"yuglify": "^0.1.4"
},
"private": true,
"APIMethod": "stub",
"proxyURL": "http://localhost:8000",
"devDependencies": {}
}
Any clue? Thank you
Upvotes: 9
Views: 47179
Reputation: 1241
For me it was a bad version value. Changing from 3.0
to 3.0.0
results in proper installation. 3.0
generates a warning, but fails to do the installation (ie it should be an error).
Upvotes: 1
Reputation: 2351
just ran into this. in my case the answer was environment variable NODE_ENV was set to 'production' I haven't looked it up but when I changed it to something else, it started working. I was testing this environment variable for something else and didn't realize it had this effect also.
Upvotes: 4
Reputation: 11745
Rename/remove your package.json file.
Create a new package file by running:
npm init
Option A: Copy the dependencies you need into the newly created package.json.
Option B: Install the packages and use --save
to add the packages to the package.json file.
Run npm install
to install the dependencies.
Upvotes: 9