javascript - A problem about the failure of npm to install dependencies. It flashed for a while.
漂亮男人
漂亮男人 2017-05-16 13:25:07
0
5
672

It flashed when installing dependencies. What is the problem?
Dependencies were not installed successfully

package.json

{
  "name": "test",
  "version": "1.0.0",
  "description": "1",
  "main": "index.js",
  "private": true,
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "webpack-dev-server"
  },  "author": "",
  "license": "ISC",
  "devDependencies": {
    "angular": "^1.4.14",
    "angular-route": "^1.6.4",
    "babel-core": "^6.24.1",
    "babel-loader": "^7.0.0",
    "babel-preset-es2015": "^6.24.1",
    "css-loader": "^0.28.0",
    "node-sass": "^4.5.2",
    "sass-loader": "^6.0.3",
    "style-loader": "^0.16.1",
    "webpack": "^2.4.1",
    "webpack-dev-server": "^2.4.4"
  }
}
漂亮男人
漂亮男人

reply all(5)
给我你的怀抱

Because your package.json only has devDependencies but no dependencies, and you have configured npm install to only install dependencies, so the installation failed after a flash.

1. Check whether NODE_ENV=production is configured, modify it and then install it.

2. Or execute NODE_ENV=development npm i

伊谢尔伦

Is it normal to run other npm operations separately in cmd? What about changing the folder and dependent files? What about using administrator rights?

刘奇

This should be something similar to @echo on
That is to say, what exactly is done during installation will be displayed.
You can try
npm set progress=falsenpm set progress=false
然后再
npm installand then
npm install
This should stop the flashing.
The reason why it flashes is that you installed relatively few dependencies and did not close the installation progress.

But it is not recommended to do this. Displaying the installation details can let us know more clearly what the program has done. 🎜
漂亮男人

"author": "", change the line. Is it good to install npm packages separately? Is npm installed?

淡淡烟草味

Need to change to development?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template