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
Improve error messaging when no entry point is found by detecting potential static asset directories
6
+
7
+
When `wrangler deploy` fails due to missing entry points, Wrangler now automatically detects common static asset directories (like `dist`, `build`, `public`, etc.) and framework-specific output directories (like Astro, Vite, Next.js, Eleventy). The error message now includes helpful suggestions about which directories might contain static assets and provides the exact command to deploy them with `--assets`.
8
+
9
+
This feature helps new users better understand what they need to do when deploying static sites to Cloudflare without requiring them to understand Wrangler configuration files.
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it [in our repository](https://github.com/changesets/changesets)
4
+
5
+
We have a quick list of common questions to get you started engaging with this project in
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it [in our repository](https://github.com/changesets/changesets)
4
+
5
+
We have a quick list of common questions to get you started engaging with this project in
Missing entry-point to Worker script or to assets directory
107
111
108
112
If there is code to deploy, you can either:
@@ -111,9 +115,26 @@ export async function getEntry(
111
115
112
116
If are uploading a directory of assets, you can either:
113
117
- Specify the path to the directory of assets via the command line: (ex: \`${fullCommand} --assets=./dist\`)
114
-
- Or ${updateConfigMessage({assets: {directory: "./dist"}})}`,
115
-
{telemetryMessage: "missing worker entrypoint or assets directory"}
116
-
);
118
+
- Or ${updateConfigMessage({assets: {directory: "./dist"}})}`;
119
+
120
+
// Add asset directory suggestions if any were found
121
+
if(assetSuggestions.length>0){
122
+
errorMessage+="\n\n";
123
+
if(assetSuggestions.length===1){
124
+
constsuggestion=assetSuggestions[0];
125
+
errorMessage+=dedent`
126
+
We noticed that there is a directory called \`${suggestion.directory}\` in your project (${suggestion.reason}). If you are trying to deploy the contents of that directory to Cloudflare, please run:
0 commit comments