I have a project with dependencies in package.json. When I install with npm install
, I get packages installed in ~/.npm
but not in the current folder's node_modules
.
NPM is creating node_modules
, but not installing packages there. There's a .staging
folder within node_modules
, which contains all of the packages for the projects, but they're not being moved out after retrieval.
Using Node v6.9.1 / npm v3.10.8.
There aren't any other projects/node_modules installed in directories higher than the current one, though there is a package.json in the parent directory as well. No node_modules
directory gets created in the parent directory, however.
Strangely enough, when I manually install a package like npm install @angular/core
it installs without problem.
This is on Ubuntu 16.04.
package.json:
{
"name": "",
"version": "0.5.0",
"description": "website (Angular2/NodeJS)",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "John Halbert <https://halbert.tech> ([email protected])",
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
"@angular/common": "^2.1.1",
"@angular/compiler": "^2.1.1",
"@angular/core": "^2.1.1",
"@angular/forms": "^2.1.1",
"@angular/http": "^2.1.1",
"@angular/platform-browser": "^2.1.1",
"@angular/platform-browser-dynamic": "^2.1.1",
"@angular/router": "^3.1.1",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.8",
"systemjs": "^0.19.39",
"zone.js": "^0.6.26"
},
"devDependencies": {
"concurrently": "^3.1.0",
"typings": "^1.4.0"
}
}
npm
flag are you using alongsideinstall
command? – Danibixnode_modules
folder and reinstall needed packages? – Danibix~/.npm
directory as well. – John Halbert