ipvm-wg / homestar

Homestar is the individual node that makes up the Everywhere Computer network (similar to how IPFS Kubo, Iroh, Nabu, or other implementation nodes make up the IPFS network). It's written in Rust and is designed for performance and composability.
https://docs.everywhere.computer/homestar/what-is-homestar/
Apache License 2.0
212 stars 23 forks source link

EACCESS error using homestar-runtime #574

Closed daffl closed 8 months ago

daffl commented 8 months ago

Summary

On Mac OS (M1), the homestar-runtime binaries are not executable. After installing homestar-runtime with npm i homestar-runtime -g and then running

homestar

The command results in an error.

Problem

Using Node 20 with nvm, Installing homestar-runtimevia npm i homestar-runtime -g and then running homestar will lead to the following error:

Error: spawn /Users/<user>/.nvm/versions/node/v20.10.0/lib/node_modules/homestar-runtime/node_modules/homestar-darwin-arm64/bin/homestar EACCES
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -13,
  code: 'EACCES',
  syscall: 'spawn /Users/<user>/.nvm/versions/node/v20.10.0/lib/node_modules/homestar-runtime/node_modules/homestar-darwin-arm64/bin/homestar',
  path: '/Users/<user>/.nvm/versions/node/v20.10.0/lib/node_modules/homestar-runtime/node_modules/homestar-darwin-arm64/bin/homestar',
  spawnargs: []
}

Impact

homestar command does not run.

Solution

The binary needs to be made executable by running

chmod +x /Users/<user>/.nvm/versions/node/v20.10.0/lib/node_modules/homestar-runtime/node_modules/homestar-darwin-arm64/bin/homestar

To Reproduce

  1. Run npm i homestar-runtime -g
  2. Run homestar
  3. Observe the error

Expected behavior

Command runs

Desktop (please complete the following information):

zeeshanlakhani commented 8 months ago

@daffl Thanks for this! Our next release (0.2.0, later next week) will have this fixed, as we now chmod in the Github Action: https://github.com/ipvm-wg/homestar/blob/main/.github/workflows/builds.yml#L170. I'll close this for now, but will update the issue on next release.

zeeshanlakhani commented 7 months ago

@daffl new npm releases are out for 0.2.0. Let me know if you run into a similar issue and we'll fix it up.