在运行npm run prerender之后,我得到以下错误
× Service worker generation failed.
host.exists is not a function
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! personal-website@0.0.0 prerender: `ng run personal-website:prerender && cpx proxy-server.js dist/server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the personal-website@0.0.0 prerender 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\milanfc\AppData\Roaming\npm-cache\_logs\2021-03-13T18_41_31_643Z-debug.log如果我运行ng build --prod,则生成服务工作线程时没有任何问题。我能做些什么来修复这个错误?
发布于 2021-03-14 04:46:59
尝试npm i @angular/service-worker
https://stackoverflow.com/questions/66618093
复制相似问题