npm install won't install devDependencies

2019-01-08 03:58发布

On windows for some reason when I run npm install it won't install devDependencies. AFAIK it should. If I run npm install --dev devDependencies are installed. I don't understand why npm install doesn't install devDependencies too, but installs only dependencies. What could be the reason? How can I fix it? Maybe smth is wrong with my package.json? It is listed below if it may be helpful

{
  "name": "try-brunch",
  "version": "0.1.0",
  "private": "true",
  "devDependencies": {
    "brunch": "^2.0.4",
    "cssnano-brunch": "^1.1.5",
    "javascript-brunch": "^1.8.0",
    "sass-brunch": "^1.9.2",
    "uglify-js-brunch": "^1.7.8"
  },
  "dependencies": {
    "jquery": "^2.1.4"
  }
}

标签: node.js npm
7条回答
倾城 Initia
2楼-- · 2019-01-08 04:25

You can use the short way for installation dependencies only for development as follows:

npm i -D <dependencies-names>
查看更多
登录 后发表回答