svg-sprite-loader icon indicating copy to clipboard operation
svg-sprite-loader copied to clipboard

Cannot read property 'version' of undefined

Open Emiliano-Bucci opened this issue 4 years ago • 6 comments

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:

  • Node.js version: v12.16.3
  • webpack version: v5.x
  • svg-sprite-loader version: v6.0.5
  • OS type & version: Mac BigSur

Emiliano-Bucci avatar Apr 13 '21 12:04 Emiliano-Bucci

Is there a solution?

Or other solutions?

KingPengZero avatar Apr 19 '21 03:04 KingPengZero

Please provide a repository with a reproduced issue.

d3x42 avatar Apr 19 '21 08:04 d3x42

Please provide a repository with a reproduced issue.

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

KingPengZero avatar Apr 19 '21 11:04 KingPengZero

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.

LuudJanssen avatar Apr 21 '21 17:04 LuudJanssen

published: [email protected]

Please close the issue if it works for you.

d3x42 avatar Apr 23 '21 11:04 d3x42

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

Emiliano-Bucci avatar Apr 23 '21 16:04 Emiliano-Bucci