Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#835 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@GhaythBenAbid 已经在做这个了。

开始于 2026年9月16日。

  • #919 来自 @GhaythBenAbid —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞

调研方向

在 Windows 上运行设置命令和 npm test,复现生成的 fastify-test 应用。检查生成的 npm test 命令、test/tsconfig.json 和 test/**/*.ts;当生成的 ESM/TypeScript 应用能够成功运行 npm test,且不出现 FASTIFY_AUTOLOAD_TYPESCRIPT 命令错误时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
JavaScript
星标
733
派生
179
平均合并
8 天 12 小时
30 天内合并 PR
2

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fastify/fastify-cli 的其他 Issue

查看 fastify/fastify-cli 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。