ChartjsNodeCanvas icon indicating copy to clipboard operation
ChartjsNodeCanvas copied to clipboard

freshRequire breaks fastify

Open luastoned opened this issue 3 years ago • 1 comments

Describe the bug

If both fastify and chartjs-node-canvas are installed, freshRequire will break something downstream.

The issue is described here as well: https://github.com/fastify/fastify/issues/3888

.../node_modules/avvio/plugin.js:17
     if (cache[keys[i]].exports === func) {
                        ^
TypeError: Cannot read properties of undefined (reading 'exports')
    at getName (.../node_modules/avvio/plugin.js:17:24)
    at new Plugin (.../node_modules/avvio/plugin.js:49:15)
    at new Boot (.../node_modules/avvio/boot.js:142:16)
    at Boot (.../node_modules/avvio/boot.js:93:22)
    at fastify (.../node_modules/fastify/fastify.js:343:17)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Versions

  • NodeJS version: 16.15.1
  • Chart.JS version: 3.8.0
  • Typescript version (if applicable): 4.7.4

luastoned avatar Jun 28 '22 10:06 luastoned

this is also a problem with webpack

Craigzyc avatar Mar 19 '25 20:03 Craigzyc