carbon-icons-svelte icon indicating copy to clipboard operation
carbon-icons-svelte copied to clipboard

Package crashes npm, yarn, & node several times

Open alvissraghnall opened this issue 3 years ago • 3 comments

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

alvissraghnall avatar Feb 20 '22 23:02 alvissraghnall

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";

metonym avatar Feb 20 '22 23:02 metonym

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

rob3r7 avatar Feb 22 '22 09:02 rob3r7

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.

DorskFR avatar Feb 23 '22 13:02 DorskFR