You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I try to build nest in my monorepo setup with the nestjs compilerOptions plugin loaded I get following error Error: Cannot find module '../../../packages/math-helpers/dist/index'
The problem occurs when an type definition from a packaged internal module is used and there is more than one directory with *.ts in the nestjs app.
as a result the transpiled controller is placed in ./dist/src/ but the import assumes the file to be in the ./dist directory directly.
for example: openapi.ApiResponse({ status: 200, type: require("../../../packages/math-helpers/dist/index").Me }),
Is there an existing issue for this?
Current behavior
when I try to build nest in my monorepo setup with the nestjs compilerOptions plugin loaded I get following error
Error: Cannot find module '../../../packages/math-helpers/dist/index'
The problem occurs when an type definition from a packaged internal module is used and there is more than one directory with *.ts in the nestjs app.
as a result the transpiled controller is placed in
./dist/src/
but the import assumes the file to be in the./dist
directory directly.for example:
openapi.ApiResponse({ status: 200, type: require("../../../packages/math-helpers/dist/index").Me }),
Minimum reproduction code
https://github.com/bindermuehle/monorepo-issue
Steps to reproduce
npm i
npm run start:dev -w nest
Expected behavior
the transpiler plugin should set the correct import path and the nest app should start without any error
Package version
6.1.2
NestJS version
9.1.4
Node.js version
v16.13.2
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: