使用路径时出现 `ERR_MODULE_NOT_FOUND` `CustomError: 无法找到包`
作者: Jazcash创建于 2023年6月21日更新于 2025年11月6日
I'm importing another file with `import { test } from "@/stuff"`. If I don't use the `@` path alias and instead do `import { test } from "./stuff"`, it works fine. Previously, the `tsconfig-paths` module has worked fine for me, but in this ESM project it seems to not work. Any ideas that don't require abandoning ESM and going back to CJS?
内容来源: TypeStrong/ts-node