我有一个扩展名为 .ts 的文件,我想先执行这个文件,然后运行 npm run build 来构建我的 angular 5 项目
package.json
"scripts": {
"ng": "ng",
"start": "ng serve",
"compile": "npm-run-all myts build",
"myts": "ts-node git.version.ts",
"build": "ng build --prod",
"test": "ng test",
},
我得到这个错误
npm 运行编译
> ng-forms-api@0.0.0 compile C:\Users\George35mk\Documents\Projects\gui\frontend\>
npm-run-all myts build
'npm-run-all' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ng-forms-api@0.0.0 compile: `npm-run-all myts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ng-forms-api@0.0.0 compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\George35mk\AppData\Roaming\npm-cache\_logs\2018-03-01T14_47_01_179Z-debug.log
PS C:\Users\George35mk\Documents\Projects\gui\frontend\
如果我运行这是工作
ts 节点 git.version.ts