swc-project / node-swc

Experimental repo to avoid spamming watchers
https://travis-ci.com/swc-project/node-swc
36 stars 11 forks source link

Error on alpine: Missing linux_musl-x64-83.node #26

Open happysalada opened 4 years ago

happysalada commented 4 years ago

On Alpine, I'm not sure if it's supposed to be possible to install swc, but I get the following failure

remote: #21 13.97 Command: node scripts/install.js || (npm install neon-cli && neon build --release)
remote: #21 13.97 Arguments:
remote: #21 13.97 Directory: /opt/app/node_modules/@swc/core
remote: #21 13.97 Output:
remote: #21 13.97 Thank you for using swc ( https://github.com/swc-project/swc ): super-fast javascript and typescript compiler
remote: #21 13.97
remote: #21 13.97 The project needs your help! Please consider supporting swc on Open Collective:
remote: #21 13.97 > https://opencollective.com/swc
remote: #21 13.97
remote: #21 13.97 Downloading binary from https://github.com/swc-project/node-swc/releases/download/v1.2.1/linux_musl-x64-83.node
remote: #21 13.97 Cannot download "https://github.com/swc-project/node-swc/releases/download/v1.2.1/linux_musl-x64-83.node":
remote: #21 13.97
remote: #21 13.97 HTTP error
remote: #21 13.97
remote: #21 13.97 Hint: If github.com is not accessible in your location
remote: #21 13.97       try setting a proxy via HTTP_PROXY, e.g.
remote: #21 13.97
remote: #21 13.97       export HTTP_PROXY=http://example.com:1234
remote: #21 13.97
remote: #21 13.97 or configure npm proxy via
remote: #21 13.97
remote: #21 13.97       npm config set proxy http://example.com:8080
remote: #21 13.97 npm notice created a lockfile as package-lock.json. You should commit this file.
remote: #21 13.97 + neon-cli@0.3.3
remote: #21 13.97 added 85 packages from 84 contributors and audited 85 packages in 3.035s
remote: #21 13.97
remote: #21 13.97 1 package is looking for funding
remote: #21 13.97   run `npm fund` for details
remote: #21 13.97
remote: #21 13.97 found 0 vulnerabilities
remote: #21 13.97
remote: #21 13.97 neon ERR! spawn cargo ENOENT
remote: #21 13.97
remote: #21 13.97 Error: spawn cargo ENOENT
remote: #21 13.97     at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
remote: #21 13.97     at onErrorNT (internal/child_process.js:468:16)
remote: #21 13.97     at processTicksAndRejections (internal/process/task_queues.js:84:21)
remote: #21 13.97 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
remote: #21 ERROR: executor failed running [/bin/sh -c yarn]: runc did not terminate sucessfully

the install script is looking for a linux_musl-x64-83.node target, but it's not available in the release folder.

Maybe there is something special to do to install on alpine? Maybe it's not possible at all?

kdy1 commented 4 years ago

I'll add support for alpine with the new version

happysalada commented 4 years ago

looking forward to it! Thanks for taking a look at this!

kdy1 commented 4 years ago

I'll fix this at the weekend. It would take some time, and I'm in the middle of final exam week.

happysalada commented 4 years ago

Got it, thanks for letting me know! Good luck with your exams!

kdy1 commented 4 years ago

Postponing as cargo does not exist on alpine. I think I need to try cross-compilation...

happysalada commented 4 years ago

Thanks for the update!