Small improvements to wrangler init
See original GitHub issue- TypeScript configuration seems to be slightly incorrect:
-
src/index.ts: Cannot find name Promise
-
tsconfig.json: Cannot find global type Array
-
-
scripts
in package.json should be prepopulated with some defaults, e.g.
"scripts": {
"start": "wrangler dev src/index.ts",
"deploy": "wrangler publish src/index.ts"
}
-
wrangler.toml
is only populated withcompatibility_date
, but should also contain:name
, matching the name of its directory.workers_dev = true
, so it’s easy to publish.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Wrangler commands - Cloudflare Workers docs
Wrangler offers a number of commands to manage your Cloudflare Workers. docs - Open this page in your default browser. init - Create...
Read more >wrangler/CHANGELOG.md at master · cloudflare ... - GitHub
This PR fixes the issue described in #2068. API errors related to syntax or preview token return the same bad_request status code, and...
Read more >Getting Started with Rust Cloudflare Workers - Rodney Lab
You can invest small chunks of your time on focussed code, starting with a simple Rust Cloudflare Worker. Then either as the initial...
Read more >Your static site on Cloudflare Workers Site - Medium
Let's make some changes to the newly created wrangler.toml file: Place account_id and zone_id; Change route to something like *blog.example.com ...
Read more >What's New in Wrangler? - YouTube
Wrangler is the command-line tool for building Cloudflare Workers. In this video, we take a look at some of the new features that...
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
I’m not aware of whether that fixed the Promise/Array issue. But also, that bug looks highly suspicious, it shouldn’t really occur. Might’ve just needed a vscode restart. If you’re not able to reproduce that issue, consider it fixed.
Right… forgot about that. So only the
name
would be good to add.