[nest] 에러

Edward Hyun·2022년 4월 7일
0

debug

목록 보기
20/24
ubuntu@ubuntu:~/abtest/abtest-nest-api$ nest build
src/abtest/abtest.controller.ts:80:32 - error TS2503: Cannot find namespace 'Express'.

80     @UploadedFile() imagefile: Express.Multer.File,
                                  ~~~~~~~
src/abtest/abtest.controller.ts:80:32 - error TS4073: Parameter 'imagefile' of public method from exported class has or is using private name 'Express'.

80     @UploadedFile() imagefile: Express.Multer.File,
                                  ~~~~~~~
src/config/multerOptions.ts:2:39 - error TS2307: Cannot find module 'fs' or its corresponding type declarations.

2 import { existsSync, mkdirSync } from 'fs';
                                        ~~~~
src/config/multerOptions.ts:5:25 - error TS2307: Cannot find module 'path' or its corresponding type declarations.

5 import { extname } from 'path';
                          ~~~~~~
src/config/typeorm.config.ts:13:14 - error TS2304: Cannot find name '__dirname'.

13   entities: [__dirname + '/../**/*.entity.{js,ts}'],
                ~~~~~~~~~

Found 5 error(s).

서버에서 node버전 : v12.22.12
npm버전 : 8.6.0

노트북 node : v14.17.5
npm : 7.22.0

node.js 업데이트 (3개의 명령어를 차례차례 입력하세요.)
sudo npm cache clean --force
sudo npm install -g n
sudo n stable

npm 업데이트
sudo npm install -g npm

node: v14.19.1 / npm : 6.14.16 ==> 실행되다 멈춤

profile
앱&웹개발(flutter, vuejs, typescript, react), 인공지능(nlp, asr, rl), 백엔드(nodejs, flask, golang, grpc, webrtc, aws, msa, nft, spring cloud, nest.js), 함수형 프로그래밍(scala, erlang)을 공부하며 정리합니다.

0개의 댓글