JetBrains / svg-sprite-loader

Webpack loader for creating SVG sprites.
MIT License
2.01k stars 272 forks source link

Cannot read property 'version' of undefined #451

Open Emiliano-Bucci opened 3 years ago

Emiliano-Bucci commented 3 years ago

Do you want to request a feature, report a bug or ask a question? Bug

What is the current behavior? I get the error Cannot read property 'version' of undefined

What is the expected behavior? It should work fine without error.

I keep getting the Cannot read property 'version' of undefined error using svg-sprite-loader with next-optimized-images (Next.js), and only if I use Webpack 5 through next.config.js (using Webpack 4.x everything works fine).

Please tell us about your environment:

KingPengZero commented 3 years ago

Is there a solution?

Or other solutions?

d3x42 commented 3 years ago

Please provide a repository with a reproduced issue.

KingPengZero commented 3 years ago

Please provide a repository with a reproduced issue.

https://github.com/AlexisWalravens/svg-sprite-loader-nextjs-bug-example

LuudJanssen commented 3 years ago

I made a PR for this issue (#452). Could be that this is actually an issue on Next.js's side, but don't have the in-depth knowledge to say anything about that.

d3x42 commented 3 years ago

published: svg-sprite-loader@6.0.6

Please close the issue if it works for you.

Emiliano-Bucci commented 3 years ago

Now i get this error -> https://github.com/JetBrains/svg-sprite-loader/issues/449