Skip to content

Binary in npm package is not executable #32

Closed

Description

@Erisa

Testing this on Linux, not sure if it affects other platforms.

The workerd binary in the workerd npm package is not marked executable, resulting in

/bin/sh: 1: /home/erisa/worker-links/node_modules/@cloudflare/workerd-linux-64/bin/workerd: Permission denied

With wrangler dev --experimenal-local this manifests as

⎔ Starting an experimental local server...
Running the 🦄 Cloudflare Workers Runtime 🦄 natively ⚡️...
/bin/sh: 1: /home/erisa/worker-links/node_modules/@cloudflare/workerd-linux-64/bin/workerd: Permission denied
✘ [ERROR] local worker: MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.

      at Miniflare.#waitForRuntime
  (/home/erisa/worker-links/node_modules/@miniflare/tre/dist/src/index.js:4770:13)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Miniflare.#init
  (/home/erisa/worker-links/node_modules/@miniflare/tre/dist/src/index.js:4680:9)
      at async startLocalWorker
  (/home/erisa/worker-links/node_modules/wrangler/wrangler-dist/cli.js:144649:9) {
    code: 'ERR_RUNTIME_FAILURE',
    cause: undefined
  }

Running chmod +x on the path in the error causes it to work as intended.

Worth noting that I am using Yarn:

$ yarn --version
1.22.19

Activity

  1. added
    bug
    on Sep 27, 2022
  2. penalosa commented on Sep 27, 2022

    @penalosa
    Contributor

    Should be fixed in @cloudflare/[email protected] (the linux x86 binary included in workerd). Could you try installing [email protected] and see if that works?

  3. Erisa commented on Sep 27, 2022

    @Erisa
    Author

    I can confirm this is fixed with [email protected]
    Thanks!

  4. penalosa commented on Sep 27, 2022

    @penalosa
    Contributor

    Amazing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions