Error in last step of deployment -> Bundling the OpenNext server...

Open
#17,104 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
22/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
build-system, cli

Research direction

The failure is a Cloudflare API error for the deploy of worker 'ecommerce-pos', caused by a service binding named WORKER_SELF_REFERENCE that points to a Worker not found in the account. The warning about === -0 comes from the generated .open-next/server-functions/default/handler.mjs and looks unrelated. Start by reproducing the deploy with the Wrangler CLI and checking how the self-reference binding is written into the deploy config. Done means either the deploy succeeds or the binding error is explained with a clear fix.

Written by the indexing model from the issue text.

Description

What versions & operating system are you using?

wrangler 4.80.0,
try to deploy on Workers & Pages

Please provide a link to a minimal reproduction

NA

Describe the Bug

all steps for deployment are done only last stage remains,
error screenshot is attached.
image

Please provide any relevant error logs

18:58:51.335
▲ [WARNING] Comparison with -0 using the "===" operator will also match 0 [equals-negative-zero]
18:58:51.336
18:58:51.336
.open-next/server-functions/default/handler.mjs:970:21001:
18:58:51.336
970 │ ...ned){if(h<0)h+=e2;else if(h===-0)return 0}return h}}b.exports=...
18:58:51.336
╵ ~~
18:58:51.336
18:58:51.336
Floating-point equality is defined such that 0 and -0 are equal, so "x === -0" returns true for both 0 and -0. You need to use "Object.is(x, -0)" instead to test for -0.
18:58:51.336
18:58:51.336
18:58:51.336
✘ [ERROR] A request to the Cloudflare API (/accounts/a590aba0959d2f226ac0c90d91b8861d/workers/scripts/pos/versions) failed.
18:58:51.336
18:58:51.337
Service binding 'WORKER_SELF_REFERENCE' references Worker 'ecommerce-pos' which was not found. Verify the Worker exists in your account and that the service name in your configuration is correct. [code: 10143]
18:58:51.337
To learn more about this error, visit: https://developers.cloudflare.com/workers/configuration/bindings/about-service-bindings/
18:58:51.337
18:58:51.337

18:58:51.337
If you think this is a bug, please open an issue at: https://github.com/cloudflare/workers-sdk/issues/new/choose
18:58:51.337
18:58:51.337
18:58:51.337
🪵 Logs were written to "/opt/buildhome/.config/.wrangler/logs/wrangler-2026-11-21_13-28-38_108.log"
18:58:51.337
ERROR Wrangler deploy command failed:
18:58:51.337
▲ [WARNING] Comparison with -0 using the "===" operator will also match 0 [equals-negative-zero]
18:58:51.337

Dominant language
TypeScript
Stars
4.7k
Forks
1.7k
Avg merge
1d 22h
Merged PRs (30d)
282

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/workers-sdk

All issues in cloudflare/workers-sdk

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.