generated README.md
generated .gitignore
generated .taprc
generated tsconfig.json
generated test/helper.ts
generated test/tsconfig.json
generated src/app.ts
generated test/plugins/support.test.ts
generated test/routes/example.test.ts
generated src/plugins/README.md
generated src/routes/README.md
generated test/routes/root.test.ts
generated src/plugins/sensible.ts
generated src/plugins/support.ts
generated src/routes/root.ts
generated src/routes/example/index.ts
--> reading package.json in sample
edited package.json, saving
saved package.json
--> project sample generated successfully
run 'npm install' to install the dependencies
run 'npm start' to start the application
run 'npm build:ts' to compile the typescript application
run 'npm run dev' to start the application with pino-colada pretty logging (not suitable for production)
run 'npm test' to execute the unit tests
cd sample && npm install
added 367 packages, and audited 532 packages in 10s
47 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm run build:ts
Found 286 errors in 4 files.
Errors Files
259 node_modules/fastify/types/instance.d.ts:202
21 node_modules/fastify/types/route.d.ts:124
3 src/routes/example/index.ts:4
3 src/routes/root.ts:4
Expected Behavior
The fastify generate --lang=typescript command should produce functional code, which may mean simply updating the bundled version of typescript.
Prerequisites
Fastify version
4.24.0
Plugin version
5.8.0
Node.js version
18.18.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
Sonoma 14.0
Description
Using
fastify-cli
to generate TypeScript boilerplate does not appear to be working.The
npm run build:ts
command flags286 errors in 4 files
- included here without colorization:node_modules/typescript/bin/tsc --pretty false > build-errors.txt 2>&1
This looks like it may have to do with version of
typescript
thatfastify-cli
sets when generating boilerplate code:If I replace this with a more recent version, I'm able to build without issue:
npm run build:ts
npm run start
npm run test
Steps to Reproduce
fastify generate sample --lang=typescript
cd sample && npm install
npm run build:ts
Expected Behavior
The
fastify generate --lang=typescript
command should produce functional code, which may mean simply updating the bundled version oftypescript
.