Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update IPX to the latest version #1581

Closed
wants to merge 1 commit into from

Conversation

HummingMind
Copy link

πŸ”— Linked issue

resolves #1519

❓ 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)
  • [x ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Newever version of IPX uses a newer version of Sharp. Also, quite a few bug fixes.

@danielroe
Copy link
Member

the reason we haven't updated this is that ipx v3 caused a number of regressions when deploying (i.e missing sharp binaries) and @pi0 is planning to investigate or make some changes in nitro that will enable the upgrade - in particular, relying on wasm IIRC.

@HummingMind
Copy link
Author

@danielroe
Ah, i see. I'll close the PR then.

Thank you for the information! 🍻

@HummingMind HummingMind closed this Nov 6, 2024
@Tofandel
Copy link

Tofandel commented Nov 13, 2024

I'm guessing the missing binaries issue is because of --omit=optional in npm as the sharp binaries with the latest upgrade are marked as optional, so a production deployment will break if it uses --omit=optional which is a bit of a shame

But the workaround in this case is to make it a major here as well and document that the binary needed needs to be required either in the package.json or installed in a separate command after --omit=optional like npm install @img/sharp-linux-x64

I guess package managers need a new feature with basically 2 layers of optional packages, basically the really optional and the required optional which simply should not be installed if cpu and os fields don't match

Or maybe we can make a package with a postinstall that installs the optionals with cpu and os fields if it detected a npm install was run with --omit=optional and have sharp require this package

Edit: I just tried myself overriding deps and
For the case of nuxt, it seems @vercel/nft and the trace util does the job, it includes all the binaries for linux)
image

And you can exclude musl using nitro.externals.traceOptions

      traceOptions: {
        ignore: (path) => path.includes('linuxmusl-x64'),
      },

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.

Bump IPX dependency to 3.x.x
3 participants