natemoo-re / astro-icon

Inline and sprite-based SVGs in Astro made easy!
https://astroicon.dev
Other
1.08k stars 60 forks source link

Sporadic crash of Astro dev server with error in astro/icon #67

Closed christian-hackyourshack closed 1 year ago

christian-hackyourshack commented 1 year ago

The following happens every once in a while (1 out of 4-5 times) when starting or restarting the Astro dev server.

Cannot convert undefined or null to object
/node_modules/.pnpm/astro-icon@0.8.0/node_modules/astro-icon/index.ts:25:23
TypeError: Cannot convert undefined or null to object
    at Function.assign (<anonymous>)
    at eval (/node_modules/.pnpm/astro-icon@0.8.0/node_modules/astro-icon/index.ts:25:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async instantiateModule (file:///workspaces/dooiy/node_modules/.pnpm/vite@3.2.2_sass@1.56.0/node_modules/vi
stramel commented 1 year ago

@christian-hackyourshack Can you share a bit more about your setup and some code?I'm unable to determine based off the error message above what the issue is.

christian-hackyourshack commented 1 year ago

I can't tell you much, as it always happens during startup.

My setup:

I am using astro-icon only in one place at the moment with some custom icons, but it never hits that place, it is during initial module loading that it crashes (as can be seen in the stacktrace above).

stramel commented 1 year ago

Can you confirm this is still happening with the latest version of astro?