[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
yarn start succeeds when NestJS project is located in ~/repos/typescript-starter, but fails when it is in ~/dépôts/typescript-starter:
Notice the reference to src directory (it should be dist).
The origin of the problem is in the generated controller (app.controller.js), more specifically on this line:
I'm submitting a...
Current behavior
yarn start
succeeds when NestJS project is located in~/repos/typescript-starter
, but fails when it is in~/dépôts/typescript-starter
:Error: Cannot find module '../../../dépôts/typescript-starter/src/cat'
.Notice the reference to
src
directory (it should bedist
). The origin of the problem is in the generated controller (app.controller.js
), more specifically on this line:Expected behavior
yarn start
succeeds when Nest project is in both locations.Minimal reproduction of the problem with instructions
cat.ts
exporting aCat
classCat
class inapp.controller.ts
@nestjs/swagger
andswagger-ui-express
nest-cli.json
yarn start
Tested from a fresh project cloned from typescript-starter. See this reproduction commit: https://github.com/ipamo/typescript-starter/commit/f8ba00619c224c51e20807c509f630f1cd29f1dd
The bug also appears after upgrading to latest version of dependencies:
yarn upgrade --latest
What is the motivation / use case for changing the behavior?
Ability to use nestjs/swagger from within any directory.
Environment