Skip to content

Generated Fastify ESM/TS app has broken npm test command (FASTIFY_AUTOLOAD_TYPESCRIPT) #835

@Ragzouken

Description

@Ragzouken

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

7.4.0

Plugin version

No response

Node.js version

24.4.0

Operating system

Windows

Operating system version (i.e. 20.04, 11.3, 10)

11

Description

Setup

fastify generate fastify-test --lang=ts --esm
cd fastify-test
npm install

Attempt

npm test

Outcome

> [email protected] test
> npm run build:ts && tsc -p test/tsconfig.json && FASTIFY_AUTOLOAD_TYPESCRIPT=1 node --test --experimental-test-coverage --loader ts-node/esm test/**/*.ts


> [email protected] build:ts
> tsc

'FASTIFY_AUTOLOAD_TYPESCRIPT' is not recognized as an internal or external command, 
operable program or batch file.

Link to code that reproduces the bug

see above

Expected Behavior

npm test should successfully run as generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions