cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.44k stars 614 forks source link

Couldnt run on localhost #5459

Open Mrinank-Bhowmick opened 3 months ago

Mrinank-Bhowmick commented 3 months ago

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

pnpm run build --filter wrangler

What version of Node are you using?

v20.10.0

What operating system and version are you using?

windows 11

Describe the Bug

Observed behavior

i am running a template in the templates folder and getting errors and warnings but couldnt run this cmd:

pnpm run --filter wrangler dev This is my output :


 WARN  Issue while reading "C:\Users\KIIT\Documents\GitHub\workers-sdk\.npmrc". Failed to replace env in config: ${NPM_PUBLISH_TOKEN}
../../../packages/quick-edit             |  WARN  Unsupported engine: wanted: {"node":"<17"} (current: {"node":"v20.10.0","pnpm":"8.15.0"})

wrangler@3.39.0 dev C:\Users\KIIT\Documents\GitHub\workers-sdk\packages\wrangler
pnpm run clean && concurrently -c black,blue --kill-others-on-fail false "pnpm run bundle --watch" "pnpm run check:type --watch --preserveWatchOutput"

 WARN  Issue while reading "C:\Users\KIIT\Documents\GitHub\workers-sdk.npmrc". Failed to replace env in config: ${NPM_PUBLISH_TOKEN}

wrangler@3.39.0 clean C:\Users\KIIT\Documents\GitHub\workers-sdk\packages\wrangler rimraf wrangler-dist miniflare-dist emitted-types

[0]  WARN  Issue while reading "C:\Users\KIIT\Documents\GitHub\workers-sdk.npmrc". Failed to replace env in config: ${NPM_PUBLISH_TOKEN} [1]  WARN  Issue while reading "C:\Users\KIIT\Documents\GitHub\workers-sdk.npmrc". Failed to replace env in config: ${NPM_PUBLISH_TOKEN} [0] [0] > wrangler@3.39.0 bundle C:\Users\KIIT\Documents\GitHub\workers-sdk\packages\wrangler [0] > node -r esbuild-register scripts/bundle.ts "--watch" [0] [1] [1] > wrangler@3.39.0 check:type C:\Users\KIIT\Documents\GitHub\workers-sdk\packages\wrangler [1] > tsc "--watch" "--preserveWatchOutput" [1] [1] [1] 3:33:16 am - Starting compilation in watch mode... [1] [0] Built. Watching for changes... [1] [1] 3:33:22 am - Found 0 errors. Watching for file changes.


### Expected behavior

PS C:\Users\KIIT\Documents\GitHub\workers-sdk\templates\worker\my-project> npx wrangler dev
⛅️ wrangler 3.41.0

Your worker has access to the following bindings:

Steps to reproduce

On project directory: pnpm run --filter wrangler dev

I followed the CONTRIBUTING.md file

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

threepointone commented 1 month ago

We need to fix this by adding templates/* to workspaces. I'll have a look sometime.