I try to run npm run build
output is below error:
root@tim-VPCEB42EG:/home/tavinder/es6# npm run build
npm ERR! Linux 4.15.0-39-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! missing script: build
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/tavinder/es6/npm-debug.log
It means you're missing a script.NPM should know which script to run when that command is executed. If you have a build script, in your package.json, under scripts:
"scripts": {
"test": "jest"
"build": "name of your build script"
},
For example, on one of my projects,
"scripts": {
"lint": "./node_modules/.bin/eslint .",
"lint:fix": "./node_modules/.bin/eslint . --fix || true",
"build": "babel src -d dist --presets es2015",
.....
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.