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
Is there an existing issue that is already proposing this?
I have searched the existing issues
Potential Commit/PR that introduced the regression
No response
Versions
7.4.2 -> 8.0.5
Describe the regression
Our project was working fine with swagger 7.4.2. After the swagger version was upgraded to 8.0.5, nest start started to fail.
λ npm run start:nest
> my-nestjs-project@0.0.1 start:nest
> nest start
node:internal/modules/cjs/loader:1228
throw err;
^
Error: Cannot find module '../../../C:/Users/lina/Downloads/my-nestjs-project/my-nestjs-project-main/src/dto/create-item.dto'
Require stack:
- C:\Users\lina\Downloads\my-nestjs-project\my-nestjs-project-main\dist\controllers\v1\items.controller.js
- C:\Users\lina\Downloads\my-nestjs-project\my-nestjs-project-main\dist\app.module.js
- C:\Users\lina\Downloads\my-nestjs-project\my-nestjs-project-main\dist\main.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
at Module._load (node:internal/modules/cjs/loader:1051:27)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (C:\Users\lina\Downloads\my-nestjs-project\my-nestjs-project-main\src\controllers\v1\items.controller.ts:14:5)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\lina\\Downloads\\my-nestjs-project\\my-nestjs-project-main\\dist\\controllers\\v1\\items.controller.js',
'C:\\Users\\lina\\Downloads\\my-nestjs-project\\my-nestjs-project-main\\dist\\app.module.js',
'C:\\Users\\lina\\Downloads\\my-nestjs-project\\my-nestjs-project-main\\dist\\main.js'
]
}
Node.js v20.17.0
The compiled file dist\controllers\v1\items.controller.js using 8.0.5 is having a wrong path which cannot be resolved. openapi.ApiResponse({ status: 201, type: require("../../../C:/Users/lina/Downloads/my-nestjs-project/my-nestjs-project-main/src/dto/create-item.dto").CreateItemDto })
With 7.4.2, the compiled file dist\controllers\v1\items.controller.js had openapi.ApiResponse({ status: 201, type: require("../../dto/create-item.dto").CreateItemDto })
I have read #3154. But it seems the issue still persists.
Did you read the migration guide?
Is there an existing issue that is already proposing this?
Potential Commit/PR that introduced the regression
No response
Versions
7.4.2 -> 8.0.5
Describe the regression
Our project was working fine with swagger 7.4.2. After the swagger version was upgraded to 8.0.5,
nest start
started to fail.The compiled file dist\controllers\v1\items.controller.js using 8.0.5 is having a wrong path which cannot be resolved.
openapi.ApiResponse({ status: 201, type: require("../../../C:/Users/lina/Downloads/my-nestjs-project/my-nestjs-project-main/src/dto/create-item.dto").CreateItemDto })
With 7.4.2, the compiled file dist\controllers\v1\items.controller.js had
openapi.ApiResponse({ status: 201, type: require("../../dto/create-item.dto").CreateItemDto })
I have read #3154. But it seems the issue still persists.
Minimum reproduction code
I created a minimum reproduction repo https://github.com/linahou18/my-nestjs-project.
Expected behavior
openapi.ApiResponse require in the compiled file has a correct path. Running
nest start
has no issue.Other
No response
The text was updated successfully, but these errors were encountered: