`rstack/types/index.d.ts` references `@rsbuild/core/types` which cannot be resolved under pnpm
@chenjiahan 已經在處理了。
開始於 2026年9月24日。
評估
這個 Issue 還沒有評估資料。
描述
Environment
- rstack: 0.8.0
- Package manager: pnpm (strict node_modules)
- Editor: VS Code
Summary
rstack/types/index.d.ts contains:
/// <reference types="@rsbuild/core/types" />
This reference fails to resolve in the editor (VS Code / tsserver), producing a red squiggly / unresolved reference error, even though:
@rsbuild/core(~2.2.8) is declared as a directdependenciesentry of therstackpackage itself- The file physically exists at
node_modules/.pnpm/[email protected][email protected]/node_modules/@rsbuild/core/types.d.ts
Steps to reproduce
- Install
[email protected]as the sole Rstack-related dependency in a pnpm project. - Open any file that pulls in
rstack/types(or opennode_modules/rstack/types/index.d.tsdirectly). - Observe the unresolved reference error on the
/// <reference types="@rsbuild/core/types" />line.
Notes
rs lib(build) completes successfully and generates valid declaration files viatsgo, suggesting the build-time module resolution differs from the editor's (tsserver's) resolution of the same triple-slash reference.- This may be a known friction point between pnpm's isolated
node_modulesstructure and TypeScript's triple-slash reference resolution algorithm, which does not follow the same resolution rules as ordinaryimportresolution.
Suggested fix
Given that rstack already re-exports APIs from its dependencies via subpaths (rstack/app, rstack/lib, rstack/lint), consider having rstack/types similarly re-export or inline the relevant @rsbuild/core type definitions rather than relying on a raw external triple-slash reference, for consistency with the rest of the package's re-export design.
- 主要語言
- TypeScript
- 星號
- 28
- 分支
- 1
- 平均合併
- 6 小時 1 分鐘
- 30 天內合併 PR
- 101
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
rstackjs/rstack-cli 的其他 Issue
-
rstackjs/rstack-cli#518 · 已指派 1 人 ·
-
難度 5/5 一週以上 新手友好度 20/100
rstackjs/rstack-cli#44 ·
-
難度 4/5 3-5 天 新手友好度 25/100
rstackjs/rstack-cli#37 ·
查看 rstackjs/rstack-cli 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 84/100
receptron/mulmoterminal#2264 ·
-
documentation
難度 2/5 1-3 小時 新手友好度 78/100
components-web-app/docs#96 ·
-
enhancement
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 68/100
simonsobs/tileviewer#114 ·
-
難度 2/5 1-3 小時 新手友好度 75/100