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. penalosa commented on Sep 27, 2022

    @penalosa
    Contributor

    Should be fixed in @cloudflare/workerd-linux-64@1.20220926.2 (the linux x86 binary included in workerd). Could you try installing workerd@1.20220926.2 and see if that works?

  2. Erisa commented on Sep 27, 2022

    @Erisa
    Author

    I can confirm this is fixed with workerd@1.20220926.2
    Thanks!

  3. 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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions