I have the following package.json in a directory ~/dirA:
{
"name": "dirA",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"vue": "^2.1.8"
},
"devDependencies": {
"vue-loader": "^10.0.2"
}
}
Then I cd to ~/dirB and run npm install ../dirA
so that the node_modules directory gets created in dirB.
The problem is that it does not install the devDependencies. My NODE_ENV environment variable is not set.
I just get this output:
[~/dirB]$ npm install ../dirA
/home/tbeadle/dirB
`-- dirA@1.0.0
`-- vue@2.1.8
npm WARN enoent ENOENT: no such file or directory, open '/home/tbeadle/dirB/package.json'
npm WARN dirB No description
npm WARN dirB No repository field.
npm WARN dirB No README data
npm WARN dirB No license field.
I can even use npm install --only=dev ../dirB
and it continues to ignore the devDependencies I have defined in the package.json.
Any idea on how I can get these devDependencies installed?