Open szpasztor opened 5 months ago
I'm having the same problem but I don't have sharp installed, maybe it's the right time to switch to npm ci
...
Try disabling SWC minification and/or pinning to an earlier version like 14.0.1 if using newer features.
This has been a repeat issue with Next.js (e.g. most recently https://github.com/vercel/next.js/issues/58557)
Quick fix
npm i --save-exact @react-three/drei@9.96.1
v9.96.4 had ce3eb7e2eb5899f9b6085d9350fb4a1e9eb3c822. cc @drcmda
I put out v9.96.5 which reverts that change.
A recent upgrade of this library seems to break builds in repos that have it as a dependency, possibly ones that also have sharp as dependency. Please see details of partial reproducibility signs below.
Package versions:
node
version: v18.17.0npm
(oryarn
) version: 1.22.19Problem description:
Build with no package.json, or code edits of any kind breaks both locally (next.js production build) and on vercel with:
The stacktrace resolves to an obfuscated file from the package. I have narrowed down the issue based on the following:
react-three/drei
was made using"@react-three/drei": "^9.82.0",
– based on this, and given that a new version (9.96.4) was released two hours ago, the above package.json reference automatically evaluated to 9.96.4 via^
(the latest non-major update)9.82.0
results in a successful build (next.js production build).We have not investigated further, and don't known the exact cause, but based on the above data points, there's likely an issue related / introduced by the new version.
Relevant code: