21.07.11 21:20 작성
·
648
0
영상 3분20초쯤 swagger를 사용하기위해 main.ts를 수정하고 npm run start:dev 로 실행하는데요
npm install --save @nestjs/swagger swagger-ui-express
해당 명령어로 설치를 완료했음에도 불구하고
Error: Cannot find module '@nestjs/core/router/route-path-factory'
Require stack:
- C:\workspace\slack-nest\a-nest\node_modules\@nestjs\swagger\dist\swagger-explorer.js
- C:\workspace\slack-nest\a-nest\node_modules\@nestjs\swagger\dist\swagger-scanner.js
- C:\workspace\slack-nest\a-nest\node_modules\@nestjs\swagger\dist\swagger-module.js
- C:\workspace\slack-nest\a-nest\node_modules\@nestjs\swagger\dist\index.js
- C:\workspace\slack-nest\a-nest\node_modules\@nestjs\swagger\index.js
- C:\workspace\slack-nest\a-nest\dist\main.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:\workspace\slack-nest\a-nest\node_modules\@nestjs\swagger\dist\swagger-explorer.js:8:30)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\workspace\\slack-nest\\a-nest\\node_modules\\@nestjs\\swagger\\dist\\swagger-explorer.js',
'C:\\workspace\\slack-nest\\a-nest\\node_modules\\@nestjs\\swagger\\dist\\swagger-scanner.js',
'C:\\workspace\\slack-nest\\a-nest\\node_modules\\@nestjs\\swagger\\dist\\swagger-module.js',
'C:\\workspace\\slack-nest\\a-nest\\node_modules\\@nestjs\\swagger\\dist\\index.js',
'C:\\workspace\\slack-nest\\a-nest\\node_modules\\@nestjs\\swagger\\index.js',
'C:\\workspace\\slack-nest\\a-nest\\dist\\main.js'
]
}
@nestjs/core/router/route-path-factory모듈을 찾을수없다는 에러가 나옵니다.
해당 모듈을 npm 으로 설치하려하면
npm ERR! code ENOLOCAL
npm ERR! Could not install from "@nestjs\core\router\route-path-factory" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Victory_Ju\AppData\Roaming\npm-cache\_logs\2021-07-11T12_14_26_578Z-debug.log
이러한 오류가 나오며 설치가 안되더군요,
제가 vscode에서 작성한 내용은 아래와 같습니다.