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
Or you could pass it in your terminal as \`--compatibility-date ${compatibilityDateStr}\`
403
-
See https://developers.cloudflare.com/workers/platform/compatibility-dates for more information.`);
404
+
See https://developers.cloudflare.com/workers/platform/compatibility-dates for more information.`,
405
+
{telemetryMessage: "missing compatibiltiy date when deploying"}
406
+
);
404
407
}
405
408
406
409
constroutes=
@@ -482,25 +485,29 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
482
485
format==="service-worker"
483
486
){
484
487
thrownewUserError(
485
-
"You cannot use the service-worker format with an `assets` directory yet. For information on how to migrate to the module-worker format, see: https://developers.cloudflare.com/workers/learning/migrating-to-module-workers/"
488
+
"You cannot use the service-worker format with an `assets` directory yet. For information on how to migrate to the module-worker format, see: https://developers.cloudflare.com/workers/learning/migrating-to-module-workers/",
489
+
{telemetryMessage: true}
486
490
);
487
491
}
488
492
489
493
if(config.wasm_modules&&format==="modules"){
490
494
thrownewUserError(
491
-
"You cannot configure [wasm_modules] with an ES module worker. Instead, import the .wasm module directly in your code"
495
+
"You cannot configure [wasm_modules] with an ES module worker. Instead, import the .wasm module directly in your code",
496
+
{telemetryMessage: true}
492
497
);
493
498
}
494
499
495
500
if(config.text_blobs&&format==="modules"){
496
501
thrownewUserError(
497
-
`You cannot configure [text_blobs] with an ES module worker. Instead, import the file directly in your code, and optionally configure \`[rules]\` in your ${configFileName(config.configPath)} file`
502
+
`You cannot configure [text_blobs] with an ES module worker. Instead, import the file directly in your code, and optionally configure \`[rules]\` in your ${configFileName(config.configPath)} file`,
503
+
{telemetryMessage: "[text_blobs] with an ES module worker"}
498
504
);
499
505
}
500
506
501
507
if(config.data_blobs&&format==="modules"){
502
508
thrownewUserError(
503
-
`You cannot configure [data_blobs] with an ES module worker. Instead, import the file directly in your code, and optionally configure \`[rules]\` in your ${configFileName(config.configPath)} file`
509
+
`You cannot configure [data_blobs] with an ES module worker. Instead, import the file directly in your code, and optionally configure \`[rules]\` in your ${configFileName(config.configPath)} file`,
510
+
{telemetryMessage: "[data_blobs] with an ES module worker"}
504
511
);
505
512
}
506
513
@@ -902,7 +909,8 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
902
909
"binding DB of type d1 must have a valid `id` specified [code: 10021]"
903
910
){
904
911
thrownewUserError(
905
-
"You must use a real database in the database_id configuration. You can find your databases using 'wrangler d1 list', or read how to develop locally with D1 here: https://developers.cloudflare.com/d1/configuration/local-development"
912
+
"You must use a real database in the database_id configuration. You can find your databases using 'wrangler d1 list', or read how to develop locally with D1 here: https://developers.cloudflare.com/d1/configuration/local-development",
913
+
{telemetryMessage: true}
906
914
);
907
915
}
908
916
@@ -1054,7 +1062,8 @@ async function publishRoutesFallback(
1054
1062
if(notProd){
1055
1063
thrownewUserError(
1056
1064
"Service environments combined with an API token that doesn't have 'All Zones' permissions is not supported.\n"+
1057
-
"Either turn off service environments by setting `legacy_env = true`, creating an API token with 'All Zones' permissions, or logging in via OAuth"
1065
+
"Either turn off service environments by setting `legacy_env = true`, creating an API token with 'All Zones' permissions, or logging in via OAuth",
1066
+
{telemetryMessage: true}
1058
1067
);
1059
1068
}
1060
1069
logger.warn(
@@ -1130,7 +1139,8 @@ async function publishRoutesFallback(
1130
1139
continue;
1131
1140
}else{
1132
1141
thrownewUserError(
1133
-
`The route with pattern "${routePattern}" is already associated with another worker called "${knownScript}".`
1142
+
`The route with pattern "${routePattern}" is already associated with another worker called "${knownScript}".`,
1143
+
{telemetryMessage: "route already associated with another worker"}
1134
1144
);
1135
1145
}
1136
1146
}
@@ -1234,7 +1244,8 @@ export async function updateQueueConsumers(
1234
1244
if(scriptName===undefined){
1235
1245
// TODO: how can we reliably get the current script name?
1236
1246
thrownewUserError(
1237
-
"Script name is required to update queue consumers"
1247
+
"Script name is required to update queue consumers",
Copy file name to clipboardExpand all lines: packages/wrangler/src/dev.ts
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1005,7 +1005,10 @@ export function getBindings(
1005
1005
// same copy-on-write TODO
1006
1006
if(!preview_bucket_name&&!local){
1007
1007
thrownewUserError(
1008
-
`In development, you should use a separate r2 bucket than the one you'd use in production. Please create a new r2 bucket with "wrangler r2 bucket create <name>" and add its name as preview_bucket_name to the r2_buckets "${binding}" in your ${configFileName(configParam.configPath)} file`
1008
+
`In development, you should use a separate r2 bucket than the one you'd use in production. Please create a new r2 bucket with "wrangler r2 bucket create <name>" and add its name as preview_bucket_name to the r2_buckets "${binding}" in your ${configFileName(configParam.configPath)} file`,
1009
+
{
1010
+
telemetryMessage: "no preview r2 bucket configured in remote dev",
1011
+
}
1009
1012
);
1010
1013
}
1011
1014
return{
@@ -1040,7 +1043,8 @@ export function getBindings(
1040
1043
hyperdrive.localConnectionString===undefined
1041
1044
){
1042
1045
thrownewUserError(
1043
-
`When developing locally, you should use a local Postgres connection string to emulate Hyperdrive functionality. Please setup Postgres locally and set the value of the 'WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_${hyperdrive.binding}' variable or "${hyperdrive.binding}"'s "localConnectionString" to the Postgres connection string.`
1046
+
`When developing locally, you should use a local Postgres connection string to emulate Hyperdrive functionality. Please setup Postgres locally and set the value of the 'WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_${hyperdrive.binding}' variable or "${hyperdrive.binding}"'s "localConnectionString" to the Postgres connection string.`,
1047
+
{telemetryMessage: "no local hyperdrive connection string"}
0 commit comments