nuxt-modules / svg-sprite

Optimize SVG files and combine them into sprite
https://codesandbox.io/s/github/nuxt-community/svg-sprite-module/
MIT License
295 stars 41 forks source link

Non-whitespace before first tag #283

Open saunafox opened 1 year ago

saunafox commented 1 year ago

Hello everyone, maybe someone has encountered such a problem I use the latest version along with Nuxt 3 and when building, I constantly get the error "Non-whitespace before first tag"

SkiperX commented 1 year ago

I also ran into a problem

messigoalzzz commented 11 months ago

怎么解决,我现在也出现了这个问题

luis-trezlabs commented 11 months ago

I have the same problem

KyleBrown-804 commented 10 months ago

I am encountering the same problem stack trace looks like this:

Screenshot 2023-10-30 at 5 06 49 PM
luigigorlero commented 10 months ago

I’ve also run into this, I was particularly confused since I’m the only one among my colleagues experiencing this issue. I’m also the only one using an Apple Silicon Mac (and macOS 13+), don’t know if that’s relevant. I tried with different Node versions but no luck. The module works fine on my older 2015 Mac.

It seems to have problems generating the unified sprite. Copying the sprite from a working environment doesn’t solve the issue.

Aira-Sakuranomiya commented 9 months ago

Same problem here. Running on M2 Pro with macOS Sonoma and Node 20.10.10.

gianpesto commented 9 months ago

i am having the same problem, apparently this happens on macOS when a .DS_Store file happens to pop up in the svg directory. as it seems since Mojave you won't get .DS_Store to show even if you press "cmd + shift + ."

The module should filter out all non-svgs when parsing them.

Hotfix: sudo find ./ -name ".DS_Store" -depth -exec rm {} \; from within the svg folder