"wrangler publish" fails, "Error: missing field `type`"
See original GitHub issueI’m very new at this and having a bad time
The wrangler.toml does not have a “type” entry so “wrangler publish” fails like this:
$ wrangler r2 bucket list
Error: missing field `type`
I tried putting type = "javascript"
in the file but it did not work
$ wrangler publish
✨ Basic JavaScript project found. Skipping unnecessary build!
Error: The entrypoint of your Worker (dist/index.js) could not be found.
I tried type = "typescript"
but also did not work
$ wrangler publish
Error: enum TargetType does not have variant constructor typescript
I tried some other random guesses but nothing that worked
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
No documentation about the type field now required ... - GitHub
I updated wrangler, and got this: > wrangler build Error: ... project config has an error, check your `wrangler.toml`: missing field `type`" ...
Read more >Deprecations · Cloudflare Workers docs
Here are common fields that are no longer required. type is no longer required. Wrangler will infer the correct project type automatically.
Read more >wrangler 1.5.0 - Docs.rs
Changelog ## 1.5.0 - ### Features - **Deprecate `wrangler publish --release` ... the `private` field no longer functions in `wrangler.toml`.
Read more >Cloudflare worker publish failing with 10019 error
We are trying to deploy a Cloudflare worker using wrangler. ... creation failed: Code 10019: workers.api.error.invalid_route_script_missing.
Read more >Getting started with Fauna and Cloudflare Workers
wrangler publish. This creates and uploads the Worker to Cloudflare. The command response should display your Worker's web address.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for all your assistance on this
yes, a base/prefix thing could potentially be useful but not really a big deal
Yeah, you’d have to prefix all your files with
files/
. I could add functionality to have a base/prefix path to look for, if you like.I’ll also close this issue since the original problem was resolved, but if you have any other questions feel free to ask them.