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