我已将我的 Angular 5 应用程序迁移到 Angular 6。除了package.json
.
当我ng deploy
在终端中使用时,它显示以下错误:
指定的命令(“部署”)无效。有关可用选项的列表,请运行“ng help”。您指的是 “help” 吗?
下面是我的 package.json 文件
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"ngsw-config": "node_modules/.bin/ngsw-config dist src/ngsw-config.json",
"ngsw-copy": "cp node_modules/@angular/service-worker/ngsw-worker.js dist/",
"deploy": "ng build --prod && npm run ngsw-config && npm run ngsw-copy"
},