我已经将Angular 5应用程序迁移到了Angular6。除中的自定义脚本外,它都运行良好package.json。
当我ng deploy在终端中使用时,它显示以下错误:
指定的命令(“部署”)无效。有关可用选项的列表,请运行“ ng 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"
},
Run Code Online (Sandbox Code Playgroud) 我有一个 angular6 通用应用程序,我正在为图像滑块集成ng-simple-slideshow,它构建成功,但是在运行时: npm run serve:SSR 给出以下错误:请提出一些解决方案。谢谢
ReferenceError: window is not defined
at F:\new_trd_back_up\dist\server.js:247023:8032
at vt (F:\new_trd_back_up\dist\server.js:246852:163)
at Object.module.exports (F:\new_trd_back_up\dist\server.js:246852:177)
at __webpack_require__ (F:\new_trd_back_up\dist\server.js:20:30)
at Object.jspdf (F:\new_trd_back_up\dist\server.js:87271:18)
at __webpack_require__ (F:\new_trd_back_up\dist\server.js:59361:30)
at Object../src/app/presentation/presentation.component.ts (F:\new_trd_back_up\dist\server.js:81159:13)
at __webpack_require__ (F:\new_trd_back_up\dist\server.js:59361:30)
at Object../src/app/presentation/presentation.component.ngfactory.js (F:\new_trd_back_up\dist\server.js:81046:11)
at __webpack_require__ (F:\new_trd_back_up\dist\server.js:59361:30)
Run Code Online (Sandbox Code Playgroud) 我最近将我的应用程序迁移到Angular 6,它在角度5中运行良好,我遇到了很多问题,但无论如何我解决了它们,但PWA我无法迁移,在角度5 PWA工作正常,但在6给出以下错误......
当我跑步的时候
command ng add @angular/PWA its showing error
**Error **
target is not defined for the specified project
Run Code Online (Sandbox Code Playgroud)
请帮助如何在Angular 6中迁移或添加PWA