nuxt-modules / og-image

Generate OG Images with Vue templates in Nuxt.
https://nuxtseo.com/og-image
359 stars 24 forks source link

Having `@nuxt/image` dependency installed throws error on Nuxt restart (in dev mode) #214

Open BobbieGoede opened 1 week ago

BobbieGoede commented 1 week ago

It's a weird issue and I'm not sure how to debug this, I have a reproduction that only works locally (not in stackblitz) on both my Macbook and on my Windows in WSL. https://stackblitz.com/edit/github-sv9mcq?file=nuxt.config.ts

Working as expected:

  1. Run npm install and start dev server with npm run dev
  2. Trigger Nuxt restart by editing and saving nuxt.config.ts,
  3. This should work as expected

Steps to reproduce issue:

  1. Install @nuxt/image with npm install -D @nuxt/image (no need to add to nuxt.config.ts)
  2. Start dev server with npm run dev
  3. Trigger Nuxt restart by editing and saving nuxt.config.ts,
  4. Throws the following error in logs:
    ERROR  [worker reload] [worker init]                                                                                                                                                        
    Something went wrong installing the "sharp" module

Possibly related to #158?

narr07 commented 6 days ago

Same issue on Mac and Node 20