You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: ensure the correct worker name is published in legacy environments (#719)
When a developer uses `--env` to specify an environment name, the Worker name should
be computed from the top-level Worker name and the environment name.
When the given environment name does not match those in the wrangler.toml, we error.
But if no environments have been specified in the wrangler.toml, at all, then we only
log a warning and continue.
In this second case, we were reusing the top-level environment, which did not have the
correct legacy environment fields set, such as the name. Now we ensure that such an
environment is created as needed.
See #680 (comment)
"You seem to be trying to use Durable Objects in a Worker written with Service Worker syntax.
2805
-
You can use Durable Objects defined in other Workers by specifying a \`script_name\` in your wrangler.toml, where \`script_name\` is the name of the Worker that implements that Durable Object. For example:
2806
-
{ name = EXAMPLE_DO_BINDING, class_name = ExampleDurableObject } ==> { name = EXAMPLE_DO_BINDING, class_name = ExampleDurableObject, script_name = example-do-binding-worker }
2807
-
Alternatively, migrate your worker to ES Module syntax to implement a Durable Object in this Worker:
"You seem to be trying to use Durable Objects in a Worker written with Service Worker syntax.
2849
+
You can use Durable Objects defined in other Workers by specifying a \`script_name\` in your wrangler.toml, where \`script_name\` is the name of the Worker that implements that Durable Object. For example:
2850
+
{ name = EXAMPLE_DO_BINDING, class_name = ExampleDurableObject } ==> { name = EXAMPLE_DO_BINDING, class_name = ExampleDurableObject, script_name = example-do-binding-worker }
2851
+
Alternatively, migrate your worker to ES Module syntax to implement a Durable Object in this Worker:
0 commit comments