thepassle / astro-service-worker

https://astro-sw-demo.netlify.app/
MIT License
65 stars 3 forks source link

Cannot read properties of undefined (reading 'renderers') #5

Open zAlweNy26 opened 1 year ago

zAlweNy26 commented 1 year ago

Hi, I'm trying to use your integration, but I get this error:

Cannot read properties of undefined (reading 'renderers')
  File:
    C:\Users\danyn\Documents\GitHub\explorershandbook\node_modules\astro-service-worker\index.js:27:33
  Code:
      26 |       'astro:config:setup': async ({ config, command, injectScript }) => {
    > 27 |         renderers = config._ctx.renderers;
         |                                 ^
      28 |         cfg = config;
      30 |         /** Add SW registration script */
rayhanadev commented 1 year ago

+1

rayhanadev commented 1 year ago

This is because the module is severely outdated and Astro updated their Integration Hooks API.