Skip to content

Generated project doesn't work out of the box with --esm --lang=ts #680

@artur-demidov

Description

@artur-demidov

Prerequisites

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

Fastify version

^4.0.0

Plugin version

^4.0.0

Node.js version

21.2.0

Operating system

macOS

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

14.1.1

Description

Project clean generated
When run the npm run dev, get an error

tsconfig.json:7:15 - error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'.

7     "module": "ES2022",
                ~~~~~~~~

Same on windows 11. npm ver 10.2.4.

Steps to Reproduce

npx fastify-cli generate test --lang=ts --esm
cd test
npm i
npm run dev

Expected Behavior

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions