coracle
coracle copied to clipboard
Crash on start after latest pull
Running on mac OS. Commit 39cb7a. Did a yarn pull; yarn; yarn dev "Possible solutions" all fail or do not improve the situation. Output below. Thanks!
~/P/o/coracle> yarn dev
yarn run v1.22.21
$ vite --host
failed to load config from /Users/antonio/Projects/others/coracle/vite.config.js
error when starting dev server:
Error: Could not load the "sharp" module using the darwin-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=darwin --cpu=arm64 sharp
- Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
at Object.<anonymous> (/Users/antonio/Projects/others/coracle/node_modules/sharp/lib/sharp.js:114:9)
at Module._compile (node:internal/modules/cjs/loader:1368:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1426:10)
at Module.load (node:internal/modules/cjs/loader:1205:32)
at Module._load (node:internal/modules/cjs/loader:1021:12)
at Module.require (node:internal/modules/cjs/loader:1230:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/Users/antonio/Projects/others/coracle/node_modules/sharp/lib/constructor.js:10:1)
at Module._compile (node:internal/modules/cjs/loader:1368:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1426:10)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This can be fixed by switching to npm, the dev branch has the fix, but other things are broken right now.
I am not a js developer so sorry if it's a stupid question. I tried to check out previous versions and they all have problems. git checkout 0.4.x; yarn; yarn dev
. I was happily running coracle until yesterday from master, albeit not sure exactly what commit I was on (a recent one because I was doing a git pull every now and then). If it was working before, how come I can't fall back to a previous version?
I went back to 0.4.1 instead. More recent versions all have different problems (with yarn). Looking forward to the next release. You can close or I will when I install the next release so that we have an additional check. Thanks
I also hit this today as well, trying to re-build my docker image. Spent a few mins trying to try the npm route, but it didnt work and Im ok with waiting.
Sorry guys, knee-deep in a refactor at the moment, hopefully I'll have a new release next week.
On the latest tag 0.4.5 I am still running into this issue with the Sharp
package.
I am trying to make sure my docker image still builds:
Instances of the problem:
I tried using the existing dockerfile which is alpine, and also tried it with Debian. The issue always seems to be related to the arm64 version of sharp
.
Error: Could not load the "sharp" module using the linux-arm64 runtime
Error: Could not load the "sharp" module using the linuxmusl-arm64 runtime
I was able to get this to work on amd64 linux using npm i --include=optional
, can you give that a try? Perplexity also has some suggestions: https://www.perplexity.ai/search/Error-Could-not-.j1EfTMgQLeEbLB94RG0CQ#0
Im jumped onto this a few different times now trying to get it to build, and I cannot get it past the sharp error.
I am using the Dockerfile in the repo.
I have added npm i --include=optional
before yarn install
.
No matter what I do it crashes on yarn run build
with similar errors to:
Error: Could not load the "sharp" module using the linux-x64 runtime
The dockerfile is written using Alpine, but I've tried it with both alpine and debian:
Error: Could not load the "sharp" module using the linuxmusl-x64 runtime
.
Any ideas? Seems like sharp is a huge pain :)
Can you try switching entirely to npm? That's what I had to do to get it to work, yarn 1.x doesn't have the ability to load architecture-specific modules. You may be able to get it to work by adding npm i --include=optional
after yarn install, but mixing package managers always makes things a little crazier.