ARTICLE AD BOX
I'm currently building a simple AI Categorization using monorepo. You can check out my github repo https://github.com/galih56/issue-classifier-ai-agent/tree/dev-testing.
My issue is i can run my API apps on dev mode. Somehow it can't run on production mode using pnpm run start after running pnpm run build
Here is the output when i try to start the built-files
PS C:\xampp\htdocs\issue-classifier-ai-agent> pnpm --filter @repo/api build > @repo/[email protected] build C:\xampp\htdocs\issue-classifier-ai-agent\apps\api > tsc PS C:\xampp\htdocs\issue-classifier-ai-agent> pnpm --filter @repo/api start > @repo/[email protected] start C:\xampp\htdocs\issue-classifier-ai-agent\apps\api > node dist/index.js node:internal/modules/esm/resolve:274 throw new ERR_MODULE_NOT_FOUND( ^ Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\xampp\htdocs\issue-classifier-ai-agent\apps\api\dist\docs\scalar' imported from C:\xampp\htdocs\issue-classifier-ai-agent\apps\api\dist\index.jsThe index.js in dist folder doesn't recognize other built-files. In this case, it won't recognize scalar.js file. I already tried to put "type":"module" on package.json and "moduleResolution": "bundler" in tsconfig.json. It doesn't fix the issue.
Is this something related to build process?
