ipx
ipx copied to clipboard
SVG images fail to load in production only (works fine in dev)
Environment
node v20.19.1
Reproduction
https://stackblitz.com/edit/github-vin71jng
Describe the bug
I'm encountering an issue with SVG images only in production.
{
"error": {
"message": "[500] [IPX_ERROR] Cannot find module '../data/patch.json'\nRequire stack:\n- /home/bas/app_51d91368-11bf-46dc-9734-426830409073/benevolt/.output/server/node_modules/.nitro/[email protected]/lib/data-patch.js"
}
}
Additional context
No response
Logs
@sgarner it's same as your issue https://github.com/unjs/ipx/issues/261 ?
Issue with bundling svgo sub-deps (happening with Nuxt/rollup, I guess) has been solved in v4 (https://github.com/unjs/ipx/releases/tag/v4.0.0-alpha.1)
Since currently there are no API breaking changes, i guess you might try fix by force resolving ipx version.
@pi0 I tried, but I got this error:
The requested module 'file:///Users/maxime/Repos/ligilab-front/node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected]_/node_modules/ipx/dist/index.mjs' does not provide an export named 'createIPXH3Handler'
Ah right! Image module needs to migrate to new APIs.