1

我尝试在 package.json 中运行 yarn run webpack: dev-> script。终端返回此错误:[Errno 2] No such file or directory: 'run'

package.json 中的脚本:

"scripts": {
"lint": "tslint 'src/main/webapp/app/**/*.ts'",
"lint:fix": "tslint 'src/main/webapp/app/**/*.ts' --fix",
"tsc": "tsc",
"tsc:w": "tsc -w",
"ngc": "ngc -p tsconfig-aot.json",
"cleanup": "rimraf target/",
"start": "yarn run webpack:dev",
"webpack:build": "yarn run ngc && webpack --config webpack/webpack.vendor.js && webpack --config webpack/webpack.dev.js",
"webpack:build:dev": "webpack --config webpack/webpack.dev.js",
"webpack:build:vendor": "webpack --config webpack/webpack.vendor.js",
"webpack:dev": "webpack-dev-server --config webpack/webpack.dev.js  --progress --inline --hot --profile --port=9060",
"webpack:test": "yarn run ngc && yarn run test",
"webpack:prod": "yarn run ngc && webpack -p --config webpack/webpack.vendor.js && webpack -p --config webpack/webpack.prod.js",
"test": "yarn run lint && karma start src/test/javascript/karma.conf.js",
"test:watch": "karma start --watch",
"postinstall": "yarn run webpack:build"

}

我在我的机器上运行这个命令

我在终端写:yarn --version -> 0.27

操作系统:Linuxmint 18.3

4

0 回答 0