Svg-sprite-loader: Cannot read property 'version' of undefined

Created on 13 Apr 2021  ·  6Comments  ·  Source: JetBrains/svg-sprite-loader

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

Most helpful comment

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.

All 6 comments

Is there a solution?

Or other solutions?

Please provide a repository with a reproduced issue.

Please provide a repository with a reproduced issue.

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

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.

published: [email protected]

Please close the issue if it works for you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jpzwarte picture jpzwarte  ·  7Comments

gzaripov picture gzaripov  ·  3Comments

alxpsr picture alxpsr  ·  4Comments

edaena picture edaena  ·  7Comments

gregorvoinov picture gregorvoinov  ·  7Comments