Issues when installing sharp in action with pnpm
Hey, trying to install sharp for my action. My monorepo is setup usng
Having trouble trying to install the correct prebuilt binary, so that it can run in the convex javascript runtime?
pnpmpnpm as packagemanager. Having trouble trying to install the correct prebuilt binary, so that it can run in the convex javascript runtime?
Error fetching POST https://hushed-koala-696.convex.cloud/api/push_config 400 Bad Request: InvalidModules: Hit an error while pushing:
Loading the pushed modules encountered the following
error:
Uncaught Failed to analyze image/actions.js: Could not load the "sharp" module using the linux-arm64 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=linux --cpu=arm64 sharp
- Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
at ../../node_modules/sharp/lib/sharp.js (../../../../node_modules/sharp/lib/sharp.js:114:0)
at __require2 (convex:/user/_deps/node/S732JE4B.js:19:50)
at ../../node_modules/sharp/lib/constructor.js (../../../../node_modules/sharp/lib/constructor.js:12:0)
at __require2 (convex:/user/_deps/node/S732JE4B.js:19:50)
at ../../node_modules/sharp/lib/index.js (../../../../node_modules/sharp/lib/index.js:6:0)
at __require2 (convex:/user/_deps/node/S732JE4B.js:19:50)
at <anonymous> (../../functions/image/actions.ts:2:18)Error fetching POST https://hushed-koala-696.convex.cloud/api/push_config 400 Bad Request: InvalidModules: Hit an error while pushing:
Loading the pushed modules encountered the following
error:
Uncaught Failed to analyze image/actions.js: Could not load the "sharp" module using the linux-arm64 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=linux --cpu=arm64 sharp
- Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
at ../../node_modules/sharp/lib/sharp.js (../../../../node_modules/sharp/lib/sharp.js:114:0)
at __require2 (convex:/user/_deps/node/S732JE4B.js:19:50)
at ../../node_modules/sharp/lib/constructor.js (../../../../node_modules/sharp/lib/constructor.js:12:0)
at __require2 (convex:/user/_deps/node/S732JE4B.js:19:50)
at ../../node_modules/sharp/lib/index.js (../../../../node_modules/sharp/lib/index.js:6:0)
at __require2 (convex:/user/_deps/node/S732JE4B.js:19:50)
at <anonymous> (../../functions/image/actions.ts:2:18)