문제 원인
nest 프로젝트를 clone해와서 내 로컬환경에서 실행하려고 보니, TS2349: This expression is not callable. Type 'typeof cookieParser' has no call signatures.와 같은 에러가 발생하였다.
문제 원인
정확한 원인은 못찾았으나, 아마 import * 에서 *을 할 때 인식이 잘 안되는건가?라는 추측을 했다.
문제 해결
문제 해결 이전
import * as cookieParser from 'cookie-parser';
문제 해결 방법
import cookieParser from 'cookie-parser';
위와 같이 바꾸어주었더니 해당 에러가 사라졌다.
'Frontend > Javascript' 카테고리의 다른 글
Property 프로퍼티란? + 프로퍼티에 접근하는 방법 (0) | 2023.03.18 |
---|---|
npm missing script "start" 에러가 계속 났던 이유 (0) | 2023.03.15 |
[오류] npm run start시 npm ERR! code ENOENT npm ERR! syscall opennpm ERR! path /Users/사용자이름/package.json ~ 에러 해결방법 (2) | 2023.03.04 |
npm으로 설치할때 --save 옵션은 무엇일까? (0) | 2023.03.03 |
콜백함수(Callback)란? (+ 일급객체,고차함수) (0) | 2023.03.03 |