问题描述
我正在使用本指南https://shareurcodes.com/blog/how-to-easily-convert-your-existing-laravel-application-into-a-progressive-web-app-by-using-workbox,通过使用WorkBox将现有的Laravel应用程序转换为Progressive Web App。
当我尝试运行 generate-sw
{Using configuration from C:/xampp/htdocs/'root'/workBox-config.js.
服务工作者生成失败:
Unable to find a place to inject the manifest. Please ensure that your service worker file contains the following: self.__WB_MANIFEST
at Object.injectManifest (C:\Users\ENteraCT\AppData\Roaming\npm\node_modules\workBox-cli\node_modules\workBox-build\build\inject-manifest.js:168:11)
at async runBuildCommand (C:\Users\ENteraCT\AppData\Roaming\npm\node_modules\workBox-cli\build\app.js:49:9)
at async module.exports (C:\Users\ENteraCT\AppData\Roaming\npm\node_modules\workBox-cli\build\app.js:138:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ generate-sw: `workBox injectManifest workBox-config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ generate-sw 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\ENteraCT\AppData\Roaming\npm-cache\_logs\2020-08-23T15_13_59_227Z-debug.loge`enter code here`
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)