Skip to content

Conversation

@danielroe
Copy link
Member

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

With upcoming release of nuxt image including ipx v3, it's important to let users know the architecture they have built for.

This adds a log after the build is complete.

CleanShot 2025-04-08 at 09 38 23@2x

questions:

  1. is it that important? we could move it earlier in the build pipeline rather than making sure it's the last thing users see
  2. do we need to do more than add this log? the main thing is that it's there for is to help users debugging issues they might face

@danielroe danielroe requested review from atinux and pi0 April 8, 2025 16:42
@cloudflare-workers-and-pages
Copy link

Deploying nuxt-image with  Cloudflare Pages  Cloudflare Pages

Latest commit: 98462bc
Status: ✅  Deploy successful!
Preview URL: https://b9dc4ab2.nuxt-image.pages.dev
Branch Preview URL: https://feat-log-ipx.nuxt-image.pages.dev

View logs

@pkg-pr-new
Copy link

pkg-pr-new bot commented Apr 8, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/image@1808

commit: 98462bc

@codecov-commenter
Copy link

codecov-commenter commented Apr 8, 2025

Codecov Report

Attention: Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.

Project coverage is 62.76%. Comparing base (cbfdcb2) to head (98462bc).
Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
src/ipx.ts 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1808      +/-   ##
==========================================
+ Coverage   62.63%   62.76%   +0.13%     
==========================================
  Files          81       81              
  Lines        3792     3808      +16     
  Branches      432      436       +4     
==========================================
+ Hits         2375     2390      +15     
- Misses       1389     1390       +1     
  Partials       28       28              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@atinux
Copy link
Member

atinux commented Apr 8, 2025

I like the idea of explaining regarding the binaries which are shipped in the output.

Do we know what is the error sent back by the IPX route when the binary is not build for the same runtime? Because having also an error log on runtime could be useful too.

@danielroe
Copy link
Member Author

danielroe commented Apr 8, 2025

@atinux The response when loading an image is a 500 error and a JSON object with following error.message:

[500] [IPX_ERROR] Could not load the "sharp" module using the darwin-arm64 runtime
Possible solutions:
- Ensure optional dependencies can be installed:
    npm install --include=optional sharp
- Ensure your package manager supports multi-platform installation:
    See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies:
    npm install --os=darwin --cpu=arm64 sharp
- Consult the installation documentation:
    See https://sharp.pixelplumbing.com/install

@danielroe danielroe merged commit b78c0ea into main Apr 8, 2025
7 checks passed
@danielroe danielroe deleted the feat/log-ipx branch April 8, 2025 19:29
@github-actions github-actions bot mentioned this pull request Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants