chore(deps): add sharp to built dependencies #171
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Title
Nuxt UI Pro + @nuxt/image on pnpm v10 → IPX 500 due to
sharp
install scripts blocked/ignored by defaultDescribe the bug
On a fresh Nuxt UI Pro landing template using pnpm v10, image rendering via
@nuxt/image
(IPX provider) fails at runtime with a 500:IPX is the default optimizer for
@nuxt/image
and is based onsharp
, so ifsharp
isn’t built/available, the provider fails with 500s. ([Nuxt Image][1])With pnpm v10, lifecycle/install scripts of dependencies are blocked by default unless explicitly allowed (e.g. via
pnpm.onlyBuiltDependencies
orpnpm approve-builds
). This meanssharp
’s postinstall never runs, so its native binary is missing. ([pnpm.io][2], [Socket][3], [GitHub][4])In my case,
pnpm approve-builds
(with no selections) also led tosharp
being effectively ignored, keeping the failure in place.Reproduction
@nuxt/image
enabled (default IPX).<UColorModeImage>
(which uses<NuxtImg>
when@nuxt/image
is installed). ([Nuxt UI][5])Actual behavior
sharp
load error (see above).Expected behavior
Environment
arm64
arm64
)Diagnostics / What I tried
node_modules
+ lockfile and reinstalling.pnpm approve-builds
(initially with no packages selected → didn’t help).pnpm rebuild sharp
.sharp
(e.g. to^0.34.x
, which provides prebuilt@img/*
binaries for darwin/arm64). ([npm][6])Root cause appears to be pnpm v10’s new defaults: install scripts are blocked unless whitelisted, so
sharp
never builds. ([pnpm.io][2])