Generated Fastify ESM/TS app has broken `npm test` command (FASTIFY_AUTOLOAD_TYPESCRIPT)
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- node.js, typescript
- 领域
- build-system, cli, testing
调研方向
在 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 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fastify/fastify-cli 的其他 Issue
-
难度 5/5 一周以上 新手友好度 35/100
fastify/fastify-cli#846 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
fastify/fastify-cli#841 ·
-
Adding Path Alias Support in fastify-cli可能重新可做 @ali139713 于 49 天前认领,目前没有进行中的 PR。 未关闭
难度 4/5 3-5 天 新手友好度 52/100
fastify/fastify-cli#806 · 1 条评论 · 7 个 reaction ·
-
Only watch specified directory (--watch CLI param)可能已有人在做 @josephreilly22 于 238 天前认领。 未关闭good first issue
难度 3/5 1-2 天 新手友好度 38/100
fastify/fastify-cli#787 · 5 条评论 · 2 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 45/100
fastify/fastify-cli#776 ·
查看 fastify/fastify-cli 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 76/100
521xueweihan/HelloGitHub#3939 ·
-
难度 1/5 1 小时以内 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
aemsites/author-kit#19 ·
-
needs-website-changes
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复