You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leaving a note here as this was very difficult to debug. If you're using nx and next-images together then an upgrade to nx 12 will break next-images because they (idiotically) decided to add in svgr by default. So if you were using next-images for SVGs nx is now going to try and process SVGs into react components, which will break your existing project.
I was combining next-images with react-inlinesvg and got this exact error. The solution isn't yet documented on nx.dev, but I figured it out by reading a bugfix PR's source code. You need to make use of withNx in next.config.js like so:
Leaving a note here as this was very difficult to debug. If you're using
nx
andnext-images
together then an upgrade to nx 12 will break next-images because they (idiotically) decided to add insvgr
by default. So if you were usingnext-images
for SVGs nx is now going to try and process SVGs into react components, which will break your existing project.I was combining
next-images
withreact-inlinesvg
and got this exact error. The solution isn't yet documented on nx.dev, but I figured it out by reading a bugfix PR's source code. You need to make use ofwithNx
innext.config.js
like so:I also needed to forcibly update
@nrwl/cli
to get builds to work. In the end, these are the relevant bits frompackage.json
:The text was updated successfully, but these errors were encountered: