npm ERR! missing script: build


Webpack visualization plug-in is used to check the total number of packages, the volume of each package and the situation inside the package
start viewing


npm run build --report


Results error NPM err! Missing script: build , later found that the scripts parameter in package.json is

"scripts": {
    "dev": "webpack-dev-server --inline --progress --config build/",
    "build:prod": "cross-env NODE_ENV=production env_config=prod node build/build.js",
    "build:sit": "cross-env NODE_ENV=production env_config=sit node build/build.js",
    "lint": "eslint --ext .js,.vue src",
    "test": "npm run lint"

So the right order should be


npm run build:prod --report


Visiting address: http://localhost :8888/

Author: happy morning with contentment
Source: Jianshu
the copyright of Jianshu belongs to the author. For any form of reprint, please contact the author for authorization and indicate the source

Similar Posts: