> [https://www.typescriptlang.org/docs/handbook/module-> resolutio...](https://link.segmentfault.com/?enc=UP3%2BNSmzBApqO%2BVKdaqDNQ%3D%3D.1H0YLjo5jd5xxQiaOnLlhZudYEvPLs8Fp0q6O09hClRfzVBRuG71BHlGDUGTGtCsrZRVnfRMaVmk%2BcqqJAI30hJbeKh0CbKdZUKlHyM5G2ac0PygTURpvXjmL36FmqBt%2F8NoKyP3zt0XIrqWfO529A%3D%3D) > > Note: `node` module resolution is the most-commonly used in the TypeScript > community and is recommended for most projects. If you are having resolution > problems with `imports` and `exports` in TypeScript, try setting > `moduleResolution: "node"` to see if it fixes the issue. 这个值是决定如何解析模块的,对于普通的导入导出没什么影响,但一旦你导入的包的 `package.json` 有 `exports` 这个字段的设置,就会有一些奇怪的表现。 一般来说不需要特殊设置,沿用默认值就可以了(默认值是什么由 Node 版本、TS 版本和 `module` 参数设定综合决定)。 TS v5.x 之后的话这个值建议设置成 `bundler`,这也是默认值。 但说实话,无论设置成哪个值,我都没有复现出来题主截图中的错误(会有其他错误)。如果题主能提供一下环境信息(Node 版本、TS 版本、VSCode 版本、Vite 版本等等)是最好的了。