提问人:somu 提问时间:11/17/2023 更新时间:11/17/2023 访问量:14
获取 ErrorCaptureStackTrace(err);当我使用“node dist/js/index.mjs”命令运行我的项目时
Getting ErrorCaptureStackTrace(err); when I ran my project with "node dist/js/index.mjs" command
问:
当我运行节点 dist/js/index.mjs 时成功构建“tsc -b”后,它给了我这个错误
node:internal/errors:496
ErrorCaptureStackTrace(err);
^
Error \[ERR_MODULE_NOT_FOUND\]: Cannot find package '/home/somnath/workspace/projects/coursera-typescript/apps/api/node_modules/@coursera-typescript/database/' imported from /home/somnath/workspace/projects/coursera-typescript/apps/api/dist/js/routes/admin.mjs
at new NodeError (node:internal/errors:405:5)
at legacyMainResolve (node:internal/modules/esm/resolve:233:9)
at packageResolve (node:internal/modules/esm/resolve:874:14)
at moduleResolve (node:internal/modules/esm/resolve:936:20)
at defaultResolve (node:internal/modules/esm/resolve:1129:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.\<anonymous\> (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v18.17.1
当我通过命令行模块“/home/somnath/workspace/projects/coursera-typescript/apps/api/node_modules/@coursera-typescript/database/”检查时,仍然说 [ERR_MODULE_NOT_FOUND]
这是一个带有 turbo repo 的 mono repo 构建。我在包/数据库和应用程序/api 之间遇到了问题。我正在使用 pnpm 作为包管理器。这是存储库链接https://github.com/somu-code/coursera-typescript
答: 暂无答案
评论