ES Modules Directory Import Not Supported
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- build-system
调研方向
先安装依赖,然后运行 pnpm build 以复现失败。检查 packages/ui/uno.config.ts、packages/ui/theme/ 目录以及相关的 tsconfig.json 设置;完成的标准是构建在没有报告的目录导入错误的情况下完成。
由索引模型根据 Issue 内容生成。
描述
🐛 Build Error: ES Modules Directory Import Not Supported
Problem Description
pnpm build fails with ES Modules directory import error when building the project.
Error Details
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/path/to/devtools/packages/ui/theme' is not supported resolving ES modules imported from /path/to/devtools/packages/ui/uno.config.ts
Steps to Reproduce
- Clone the repository
- Run
pnpm install - Run
pnpm build - Observe the build failure
Expected vs Actual Behavior
Expected: The build should complete successfully without errors.
Actual: Build fails with directory import error due to missing file extensions in TypeScript import statements.
Environment Information
- Node.js: v23.11.0
- pnpm: 10.7.0
- OS: Mac OS 15.5
Root Cause Analysis
ES Modules require explicit file extensions in import statements, but some imports in the codebase are missing .ts extensions, particularly in the UI package's theme configuration.
Proposed Solution
1. Update TypeScript Configuration
Add the following options to tsconfig.json:
{
"compilerOptions": {
"allowImportingTsExtensions": true,
"noEmit": true
}
}
2. Fix Import Statements
Update import statements to include explicit .ts extensions where needed, especially in:
packages/ui/theme/directory imports- Related TypeScript module imports
Impact
This affects the build pipeline and prevents successful compilation of the packages. The issue is related to ES Modules import resolution in TypeScript configuration.
- 主要语言
- TypeScript
- 星标
- 2.9k
- 派生
- 291
- 平均合并
- 4 天 6 分钟
- 30 天内合并 PR
- 27
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
vuejs/devtools 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 69/100
维护者通常 3 天内回复
-
Upgrade Electron to fix ZIP extraction on Node.js 26可能已有人在做 @ondrhn 于 52 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 3 天内回复
-
On the landing site, the "Developer experience" card is redundant可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 3 天内回复
-
难度 5/5 一周以上 新手友好度 18/100
维护者通常 3 天内回复
相似的 Issue
-
unwrapDatabaseError masks real DB errors with TypeError: Cannot convert object to primitive value未关闭
难度 2/5 1-3 小时 新手友好度 74/100
NEARBuilders/everything-dev#798 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
vercel-labs/durable-harness#53 ·
维护者通常 1 天内回复
-
[Bug]: Redesign tab bars ignore clicks on Linux: hidden chat layers keep window drag regions可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
experiência: a doc manda subir para o Micro do Supabase, mas não diz que exige plano pago nem quanto custa可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area/docs area/ui enhancement
难度 1/5 1-3 小时 新手友好度 88/100
melgarafael/DeskcommCRM#4098 ·
维护者通常 1 天内回复
-
dependencies platform: ios
难度 1/5 1-3 小时 新手友好度 78/100
software-mansion/react-native-executorch#1617 ·
维护者通常 1 天内回复