Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to write the service worker file. #178

Open
husayt opened this issue Dec 30, 2024 · 0 comments
Open

Unable to write the service worker file. #178

husayt opened this issue Dec 30, 2024 · 0 comments

Comments

@husayt
Copy link

husayt commented Dec 30, 2024

Hi, has anyone seen this error during the build?:
Unable to write the service worker file. 'Unexpected end of JSON input'

This is the message

 ERROR  Unable to write the service worker file. 'Unexpected end of JSON input'  
    at writeSWUsingDefaultTemplate (mycode\node_modules\.pnpm\[email protected]_@[email protected]\node_modules\workbox-build\build\lib\write-sw-using-default-template.js:68:15)
    at async generateSW (mycode\node_modules\.pnpm\[email protected]_@[email protected]\node_modules\workbox-build\build\generate-sw.js:95:23)
    at async generateServiceWorker (/mycode/node_modules/.pnpm/[email protected][email protected]_@[email protected][email protected][email protected]_@ty_3ztzfctubrug6lzltrdozjxziu/node_modules/vite-plugin-pwa/dist/index.js:228:23)
    at async _generateSW (/mycode/node_modules/.pnpm/[email protected][email protected]_@[email protected][email protected][email protected]_@ty_3ztzfctubrug6lzltrdozjxziu/node_modules/vite-plugin-pwa/dist/index.js:362:5)
    at async Object.generateSW (/mycode/node_modules/.pnpm/[email protected][email protected]_@[email protected][email protected][email protected]_@ty_3ztzfctubrug6lzltrdozjxziu/node_modules/vite-plugin-pwa/dist/index.js:469:14)
    at async regeneratePWA (/mycode/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]_@[email protected][email protected]_e5xqi6kpxk22xb3xfa5pszpd4m/node_modules/@vite-pwa/nuxt/dist/shared/nuxt.56487db8.mjs:120:3)
    at async /mycode/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]_@[email protected][email protected]_e5xqi6kpxk22xb3xfa5pszpd4m/node_modules/@vite-pwa/nuxt/dist/shared/nuxt.56487db8.mjs:568:9
    at async /mycode/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]__ior_7fvnddufw6yzhgbxz3aqiqwypu/node_modules/nuxt/dist/index.mjs:4194:7
    at async build (/mycode/node_modules/.pnpm/[email protected][email protected]/node_modules/nitropack/dist/core/index.mjs:1648:3)
    at async /mycode/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]__ior_7fvnddufw6yzhgbxz3aqiqwypu/node_modules/nuxt/dist/index.mjs:4214:5
    at async build (/mycode/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]__ior_7fvnddufw6yzhgbxz3aqiqwypu/node_modules/nuxt/dist/index.mjs:6572:3)
    at async Object.run (/mycode/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/chunks/build.mjs:103:5)
    at async runCommand$1 (/mycode/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.DSPrE7vg.mjs:1767:16)
    at async runCommand$1 (/mycode/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.DSPrE7vg.mjs:1758:11)
    at async runMain$1 (/mycode/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.DSPrE7vg.mjs:1896:7)

System:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant