image icon indicating copy to clipboard operation
image copied to clipboard

Locally Added JPG and SVG Files Ruined After Latest Package Update in SSR Mode

Open Bader-Idris opened this issue 8 months ago • 1 comments

Following the latest update of the package, locally added JPG and SVG files are now malfunctioning, resulting in a 500 Internal Server Error.

Error Details:

For the SVG file, the server returns the following errors:

Error 1:

Request URL:
http://localhost:5000/_ipx/f_webp/imgs/thanks.svg
Request Method:
GET
Status Code:
500 Internal Server Error
Remote Address:
[::1]:5000
Referrer Policy:
strict-origin-when-cross-origin

# The previews object in the network console says:
{
    "error": {
        "message": "[500] [IPX_ERROR] \nSomething went wrong installing the \"sharp\" module\n\nCannot find module '../build/Release/sharp-linuxmusl-x64.node'\nRequire stack:\n- /app/.output/server/node_modules/sharp/lib/sharp.js\n- /app/.output/server/node_modules/sharp/lib/constructor.js\n- /app/.output/server/node_modules/sharp/lib/index.js\n\nPossible solutions:\n- Install with verbose logging and look for errors: \"npm install --ignore-scripts=false --foreground-scripts --verbose sharp\"\n- Install for the current linuxmusl-x64 runtime: \"npm install --platform=linuxmusl --arch=x64 sharp\"\n- Consult the installation documentation: https://sharp.pixelplumbing.com/install"
    }
}

and

Request URL:
http://localhost:5000/_ipx/f_webp&q_75&blur_75&s_50x50/imgs/thanks.svg
Request Method:
GET
Status Code:
500 Internal Server Error
Remote Address:
[::1]:5000
Referrer Policy:
strict-origin-when-cross-origin

# the preview is the same as above

Component Used:

<NuxtImg
        src="/imgs/thanks.svg"
        alt="thank you message icon"
        :placeholder="[50, 50, 75, 75]"
        format="webp"
        loading="lazy"
      />

Prior to the latest update, this SVG file was functioning correctly in SSR mode, but it is now broken in CSR mode, as detailed in issue #1806.

Additionally, another file, which was functional in both SSR and CSR modes, is as follows:

<NuxtImg
        src="/imgs/meTwentyFour.jpg"
        alt="personal-img"
        class="mi-imagen"
        :placeholder="[50, 50, 75, 75]"
        format="webp"
        loading="lazy"
/>

Conclusion:

This issue appears to be a regression introduced by the recent package update. I would appreciate any guidance on resolving this problem or any potential fixes that could be applied.

Thank you for your attention to this matter.

Bader-Idris avatar Apr 13 '25 11:04 Bader-Idris

This issue is still open and not resolved yet!

abid365 avatar Nov 10 '25 06:11 abid365