cloudflare / cloudflare/worker-typescript-template

This worker template's "dev" script is not OS-independent, fails to run on Windows

Open
#36 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
447
Forks
93
PR merge metrics
No merged PRs in 30d

Description

Prefixing commands with environment variables only works on *nix, because Windows is awful
So your templates won't run for Windows folks

```sh
$ yarn dev
yarn run v1.22.10
$ NODE_ENV=development npm run build
'NODE_ENV' is not recognized as an internal or external command, operable program or batch file.
error Command failed with exit code 1.
```

The equivalent for Windows is `SET NODE_ENV=development & npm run build`
But it would be a cleaner/less hacky solution probably to use `cross-env`, because of whatever weird edgecase stuff may pop up:

https://github.com/kentcdodds/cross-env

`cross-env NODE_ENV=development npm run build`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.