workers-sdk: πŸ› BUG: missing entry-point

What version of Wrangler are you using?

2.0.29

What operating system are you using?

Mac

Describe the Bug

✘ [ERROR] Missing entry-point: The entry-point should be specified via the command line (e.g. wrangler dev path/to/script) or the main config field

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 15 (4 by maintainers)

Most upvoted comments

Usually this message surfaces when Wrangler can’t detect the entry-point for your Worker, which should be specified either on the command line when running Wrangler:

wrangler dev index.ts

or in Wrangler’s config file:

# wrangler.toml
main = "index.ts"

If you’ve specified either of those options and Wrangler still surfaces the message about a missing entrypoint, please open a new issue with a minimal reproduction and we can investigate further.

Had the same problem. Ended up creating worker in Cloudflare dashboard and then initialising locally.

  1. npm install -g wrangler

  2. wrangler login

  3. wrangler init --from-dash your-random-worker-name

This creates all local dependencies and setup.

Then cd into your project dir (your-random-worker-name) and run npm run start

Profit!

Same issue for me in a simple github actions (monorepo with pnpm workspaces)

Facing same issue. @cameron-robey kindly reopen the issue.