You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everytime I install dependencies with yarn I have this error
Error: Could not load the "sharp" module using the darwin-x64 runtime
Possible solutions:
- Ensure optional dependencies can be installed:
npm install --include=optional sharp
yarn add sharp --ignore-engines
- 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=x64 sharp
- Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
at Object.sharp (/.next/server/app/(app)/(other)/page.js:132:18)
at __webpack_require__ (/.next/server/webpack-runtime.js:33:43)
at eval (./payload.config.ts:14:63)
at (rsc)/./payload.config.ts (/.next/server/app/(app)/(other)/page.js:688:1)
at __webpack_require__ (/.next/server/webpack-runtime.js:33:43)
at eval (_config/utilities/payload.ts:6:73)
at (rsc)/./src/app/(payload)/_config/utilities/payload.ts (/.next/server/app/(app)/(other)/page.js:1072:1)
at __webpack_require__ (/.next/server/webpack-runtime.js:33:43)
at eval (_utils/getDocument.util.ts:9:95)
at (rsc)/./src/app/(app)/_utils/getDocument.util.ts (/.next/server/app/(app)/(other)/page.js:775:1)
at __webpack_require__ (/.next/server/webpack-runtime.js:33:43)
at eval (_components/common/Footer/index.tsx:7:89)
at (rsc)/./src/app/(app)/_components/common/Footer/index.tsx (/.next/server/app/(app)/(other)/page.js:732:1)
at __webpack_require__ (/.next/server/webpack-runtime.js:33:43)
at eval (layout.tsx:8:91)
at (rsc)/./src/app/(app)/(other)/layout.tsx (/.next/server/app/(app)/(other)/page.js:699:1)
at Function.__webpack_require__ (/.next/server/webpack-runtime.js:33:43)
at async Promise.all (index 0)
digest: "1475203100"
and as suggested I fix the problem with the command yarn add sharp --ignore-engines.
This happens everytime I install new dependecies or update old ones.
Hey, both next.js and sharp decided to drop support for yarn v1 without the --ignore-engines flag, so we did too. If you decide to use yarn v1 (I cannot recommend it), you will have to always append --ignore-engines or put it in a .yarnrc file like we do in our templates.
Link to reproduction
No response
Payload Version
3.0.0-beta.52
Node Version
20
Next.js Version
14.3.0-canary.68
Describe the Bug
Everytime I install dependencies with yarn I have this error
and as suggested I fix the problem with the command
yarn add sharp --ignore-engines
.This happens everytime I install new dependecies or update old ones.
Reproduction Steps
yarn install
yarn add sharp --ignore-engines
Adapters and Plugins
The text was updated successfully, but these errors were encountered: