astro-service-worker icon indicating copy to clipboard operation
astro-service-worker copied to clipboard

Cannot read properties of undefined (reading 'renderers')

Open zAlweNy26 opened this issue 2 years ago • 2 comments

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 */

zAlweNy26 avatar Nov 13 '22 13:11 zAlweNy26

+1

rayhanadev avatar Feb 01 '23 03:02 rayhanadev

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

rayhanadev avatar Feb 01 '23 04:02 rayhanadev