Skip to main content
You will need pnpm and Node.js installed.
1

Create a workspace

mkdir rides-demo
cd rides-demo
2

Initialize the project

Accept all defaults when prompted.
pnpm init
3

Switch package to ESM

pnpm pkg set type=module
4

Install TypeScript tooling

pnpm add -D tsx typescript @types/node
5

Create tsconfig.json

tsconfig.json
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "Node16",
    "moduleResolution": "Node16",
    "lib": ["ES2022", "DOM"],
    "types": ["node"]
  }
}