Nuxt development server hot-reload causing error when using in Nuxt (3) server-side plugin/module nuxt-dsi - dev server has to be restarted every time this occurs. Can't seem to catch, handle, or prevent the error in any way.
✔ Nitro built in 522 ms
ℹ Vite client warmed up in 2684ms
✔ Nitro built in 259 ms
Error: Could not load font to the system's font host
at Object.registerFont (/Users/larry/Development/websites/l422y/nuxt-app/node_modules/canvas/index.js:48:17)
at file:///Users/larry/Development/websites/l422y/nuxt-app/.nuxt/dev/index.mjs:511:27
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:528:24)
at async loadESM (node:internal/process/esm_loader:91:5)
at async handleMainPromise (node:internal/modules/run_main:65:12)
Error: Could not load font to the system's font host 00:36:34
at Object.registerFont (/Users/larry/Development/websites/l422y/nuxt-app/node_modules/canvas/index.js:48:17)
at file:///Users/larry/Development/websites/l422y/nuxt-app/.nuxt/dev/index.mjs:511:27
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
Steps to Reproduce
Create Nuxt (3) app, install the nuxt-dsi, module, and setup custom fonts, then start the development server, and modify something within the application (server side) to force a reload.
Issue
Nuxt development server hot-reload causing error when using in Nuxt (3) server-side plugin/module nuxt-dsi - dev server has to be restarted every time this occurs. Can't seem to catch, handle, or prevent the error in any way.
Steps to Reproduce
Create Nuxt (3) app, install the nuxt-dsi, module, and setup custom fonts, then start the development server, and modify something within the application (server side) to force a reload.
Example DSI configuration:
Your Environment
Node v18.8.0 NPM v8.18.0 macOS 13.0 (22A380) Apple Silicon M1 Max