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
Running npm create cloudflare@latest my-app -- --template cloudflare/workers-sdk/templates/worker-speedtest as described in the Quickstarts results in a project that can't be deployed.
Expected behavior
I expect the code generated by the template to be in a state where it can be deployed.
Steps to reproduce
Please provide the following:
Run npm create cloudflare@latest my-app -- --template cloudflare/workers-sdk/templates/worker-speedtest and as it to deploy the worker.
The reason is that packages.json wants to deploy src/index.js, while the template contains src/index.ts. It seems this was refactored at some point from .js to .ts without updating packages.json?
After fixing this and other references to .js files in the code, npm run deploy worked and deployed the worker.
However searching through the source for other occurrences of .js, showed that the test code also still referred to javascript files, so npm run test failed, and simply changing that to .ts still left some errors.
So I think that makes this a bit more than a trivial change, which is why I'm opening this issue instead of opening a PR directly.
I'll send a PR to fix both the deploy issue and the unit tests later today or tomorrow.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered:
The code had been converted to typescript in 026d944, but packages.json and several other places still refered to .js files.
In addition a refactoring of the test code meant tests for both /up and /down urls were now being sent to the handler for /up, causing the tests to fail. I removed some of the test in up.test.ts since they were testing different values of the ?bytes= parameter, but this parameter is only used in down.ts, not in up.ts.
Which Cloudflare product(s) does this pertain to?
Workers for Platforms
What version(s) of the tool(s) are you using?
鉀咃笍 wrangler 3.56.0
What version of Node are you using?
v20.10.0
What operating system and version are you using?
Fedora 39
Describe the Bug
Observed behavior
Running
npm create cloudflare@latest my-app -- --template cloudflare/workers-sdk/templates/worker-speedtest
as described in the Quickstarts results in a project that can't be deployed.Expected behavior
I expect the code generated by the template to be in a state where it can be deployed.
Steps to reproduce
Please provide the following:
Run
npm create cloudflare@latest my-app -- --template cloudflare/workers-sdk/templates/worker-speedtest
and as it to deploy the worker.The reason is that
packages.json
wants to deploysrc/index.js
, while the template containssrc/index.ts
. It seems this was refactored at some point from .js to .ts without updatingpackages.json
?After fixing this and other references to
.js
files in the code,npm run deploy
worked and deployed the worker.However searching through the source for other occurrences of
.js
, showed that the test code also still referred to javascript files, sonpm run test
failed, and simply changing that to.ts
still left some errors.So I think that makes this a bit more than a trivial change, which is why I'm opening this issue instead of opening a PR directly.
I'll send a PR to fix both the deploy issue and the unit tests later today or tomorrow.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: