After successful "tsc -b" build when I ran node dist/js/index.mjs it's giving me this error
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
When I check via command line module "/home/somnath/workspace/projects/coursera-typescript/apps/api/node_modules/@coursera-typescript/database/" is there but still saying [ERR_MODULE_NOT_FOUND]
This is a mono repo build with turbo repo. I facing problem in between packages/database and apps/api. I am using pnpm as a package manager. Here is the repository link https://github.com/somu-code/coursera-typescript