Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

[Bug] Can not run docker in local #28

Open
Left024 opened this issue Sep 3, 2023 · 1 comment
Open

[Bug] Can not run docker in local #28

Left024 opened this issue Sep 3, 2023 · 1 comment

Comments

@Left024
Copy link

Left024 commented Sep 3, 2023

Because of Cloudflare's resource limitations, I plan to run it on my VPS, but it failed to run. The log is as follows:

root@:~/imdb-api# docker run -p 3000:3000 -it imdb-api

> [email protected] start
> wrangler dev src/index.js --port 3000

 ⛅️ wrangler 3.3.0 (update available 3.6.0)
-----------------------------------------------------
wrangler dev now uses local mode by default, powered by 🔥 Miniflare and 👷 workerd.
To run an edge preview session for your Worker, use wrangler dev --remote
✔ Would you like to help improve Wrangler by sending usage metrics to Cloudflare? … no
Your choice has been saved in the following file: ../root/.config/.wrangler/metrics.json.

  You can override the user level setting for a project in `wrangler.toml`:

   - to disable sending metrics for a project: `send_metrics = false`
   - to enable sending metrics for a project: `send_metrics = true`
⎔ Starting local server...
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ [b] open a browser, [d] open Devtools, [l] turn off local mode, [c] clear console, [x] to exit                                                                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
/app/node_modules/wrangler/wrangler-dist/cli.js:30632
            throw a;
            ^

Error: spawn /app/node_modules/@cloudflare/workerd-linux-64/bin/workerd ENOENT
    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)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /app/node_modules/@cloudflare/workerd-linux-64/bin/workerd',
  path: '/app/node_modules/@cloudflare/workerd-linux-64/bin/workerd',
  spawnargs: [
    'serve',
    '--binary',
    '--experimental',
    '--socket-addr=entry=0.0.0.0:3000',
    '--external-addr=loopback=localhost:40203',
    '--control-fd=3',
    '-',
    '--inspector-addr=127.0.0.1:40149'
  ]
}

Node.js v20.5.1
@tab
Copy link

tab commented Sep 9, 2023

@Left024 I had the same issue

I switched to debian instead of alpine

FROM node:20.6-bookworm

Similar issue in wrangler repo
cloudflare/workers-sdk#3301

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants