error deploying

below
1 Reply
Roman
RomanOP3mo ago
...
[custom build]
[custom build] 22:07:51 [build] Server built in 10.92s
[custom build] 22:07:51 [build] Complete!
[custom build]
▲ [WARNING] The package "node:util" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\constructor.js


▲ [WARNING] The package "node:events" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\utility.js


▲ [WARNING] The package "node:path" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\output.js


▲ [WARNING] The package "node:stream" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\constructor.js
...
[custom build]
[custom build] 22:07:51 [build] Server built in 10.92s
[custom build] 22:07:51 [build] Complete!
[custom build]
▲ [WARNING] The package "node:util" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\constructor.js


▲ [WARNING] The package "node:events" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\utility.js


▲ [WARNING] The package "node:path" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\output.js


▲ [WARNING] The package "node:stream" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\constructor.js
▲ [WARNING] The package "node:child_process" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\libvips.js


▲ [WARNING] The package "node:os" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\utility.js


▲ [WARNING] The package "node:crypto" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\libvips.js



✘ [ERROR] Build failed with 2 errors:

✘ [ERROR] Could not resolve "child_process"

node_modules/detect-libc/lib/detect-libc.js:6:29:
6 │ const childProcess = require('child_process');
╵ ~~~~~~~~~~~~~~~

The package "child_process" wasn't found on the file system but is built into node.
- Add the "nodejs_compat" compatibility flag to your project.



✘ [ERROR] Could not resolve "fs"

node_modules/detect-libc/lib/filesystem.js:6:19:
6 │ const fs = require('fs');
╵ ~~~~

The package "fs" wasn't found on the file system but is built into node.
- Add the "nodejs_compat" compatibility flag to your project.





:wood: Logs were written to "C:\Users\roman\AppData\Roaming\xdg.config\.wrangler\logs\wrangler-2025-09-09_21-07-32_083.log"
error: script "deploy" exited with code 1
▲ [WARNING] The package "node:child_process" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\libvips.js


▲ [WARNING] The package "node:os" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\utility.js


▲ [WARNING] The package "node:crypto" wasn't found on the file system but is built into node.

Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag.
Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported
from:
- node_modules\sharp\lib\libvips.js



✘ [ERROR] Build failed with 2 errors:

✘ [ERROR] Could not resolve "child_process"

node_modules/detect-libc/lib/detect-libc.js:6:29:
6 │ const childProcess = require('child_process');
╵ ~~~~~~~~~~~~~~~

The package "child_process" wasn't found on the file system but is built into node.
- Add the "nodejs_compat" compatibility flag to your project.



✘ [ERROR] Could not resolve "fs"

node_modules/detect-libc/lib/filesystem.js:6:19:
6 │ const fs = require('fs');
╵ ~~~~

The package "fs" wasn't found on the file system but is built into node.
- Add the "nodejs_compat" compatibility flag to your project.





:wood: Logs were written to "C:\Users\roman\AppData\Roaming\xdg.config\.wrangler\logs\wrangler-2025-09-09_21-07-32_083.log"
error: script "deploy" exited with code 1
Is that something new or have ive broken my local system somehow? Any steps I should try to resolve this? Or provide any information I can give that could help understand the problem? I didn’t have this issue previously, so either has something changed with deploy system or with my machine I’m using wrangler deploy Adding "compatibility_flags": ["nodejs_compat"] to wrangler config does seem to solve the issue for now But previously it was working without me having to do that so I’d like what is/could be the reason/problem/issue

Did you find this page helpful?