#optimized image generation failed

3 messages · Page 1 of 1 (latest)

dawn willow
#

hey folks I'm using astro exprimental Image module from astro:assets it working perfectly fine in the development but when i run the build command everthing goes well except the optimized image genration I get this error I don't face any kind of trouble in development

 error   File URL path must be absolute
  File:
    D:\Buy1Gram Websites\Buy1Gram-Sales-Partner\node_modules\astro\dist\assets\generate.js:51:41
  Code:
    50 |   const imageService = await getConfiguredImageService();
    > 51 |   const resultData = await imageService.transform(
         |                                         ^
      52 |     fileData,
      53 |     { ...options, src: originalImagePath },
      54 |     buildOpts.settings.config.image.service.config
  Stacktrace:
TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must be absolute
    at new NodeError (node:internal/errors:405:5)
    at getPathFromURLWin32 (node:internal/url:1331:11)
    at fileURLToPath (node:internal/url:1361:22)
    at imageMetadata (file:///D:/Buy1Gram%20Websites/Buy1Gram-Sales-Partner/dist/chunks/astro.d4fb8a30.mjs:3936:10)      
    at getRotationForEXIF (file:///D:/Buy1Gram%20Websites/Buy1Gram-Sales-Partner/dist/chunks/astro.d4fb8a30.mjs:14603:22)
    at Object.transform (file:///D:/Buy1Gram%20Websites/Buy1Gram-Sales-Partner/dist/chunks/astro.d4fb8a30.mjs:14629:28)  
    at generateImage (file:///D:/Buy1Gram%20Websites/Buy1Gram-Sales-Partner/node_modules/astro/dist/assets/generate.js:51:41)
    at async generateImage (file:///D:/Buy1Gram%20Websites/Buy1Gram-Sales-Partner/node_modules/astro/dist/core/build/generate.js:153:26)
    at async generatePages (file:///D:/Buy1Gram%20Websites/Buy1Gram-Sales-Partner/node_modules/astro/dist/core/build/generate.js:140:7)
    at async staticBuild (file:///D:/Buy1Gram%20Websites/Buy1Gram-Sales-Partner/node_modules/astro/dist/core/build/static-build.js:86:7)
mossy starBOT
#
Quiet in here?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.

odd ore
#

I think it's a bug on Windows with the Squoosh service..