carbon-design-system / carbon-icons-svelte

Carbon Design System SVG icons as Svelte components
https://carbon-icons-svelte.onrender.com
Apache License 2.0
397 stars 22 forks source link

Package crashes npm, yarn, & node several times #132

Open alvissraghnall opened 2 years ago

alvissraghnall commented 2 years ago

I'd tried installing and using (only successfully installed once) the package alongside carbon-components-svelte (worked pretty fine), but it almost never actually successfully installed. It'd always crash during the installation process via yarn. Only time it actually installed, upon running "npm run dev", or "yarn dev", nodejs throws "Heap Out Of Memory Error". Debugged quite a while and discovered the problem's from this package. Was first using elderjs, but switched up to plain ol' svelte ( as i debugged). Nothing changed.

I run Mint 20.2 (Uma) and Windows 10. Nodejs v16.14.0 npm v8.3.1 yarn v1.22.17

metonym commented 2 years ago

How are you importing icons?

I'd recommend the direct import method, unless you are using optimizeImports from carbon-preprocess-svelte:

import Add16 from "carbon-icons-svelte/lib/Add16";
rob3r7 commented 2 years ago

I had success with set NODE_OPTIONS=--max-old-space-size=8192

DorskFR commented 2 years ago

Same issue with a crash with npm run build or npm run dev on an mbp m1 with node v16.13.1 edit: fixed using optimizeImports.