-
카테고리
-
세부 분야
풀스택
-
해결 여부
미해결
하는 것 마다 에러 나는데 버전 때문인가요..
20.03.26 21:01 작성 조회수 183
0
const util = require('util');
const crypto = require('crypto');
const dontuseme = util.deprecate((x, y) =>{
console.log(x + y);
});
dontuseme(1,2);
이 소스 코드를 쓰면
아래 에러가 나는데
/usr/local/bin/node /Users/usang-in/WebstormProjects/nodejs-crawler/lecture2/util.js
internal/process/warning.js:121
throw new ERR_INVALID_ARG_TYPE('warning', ['Error', 'string'], warning);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "warning" argument must be one of type Error or string. Received type undefined
at process.emitWarning (internal/process/warning.js:121:11)
at deprecated (internal/util.js:61:17)
at Object.<anonymous> (/Users/usang-in/WebstormProjects/nodejs-crawler/lecture2/util.js:6:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
at internal/main/run_main_module.js:17:11
Process finished with exit code 1
원인이 뭘까요..
답변을 작성해보세요.
0
0
Woo Sangin
질문자2020.03.28
에러 메시지 보고 구글에서 찾아보고 몰라서 질문 하는 겁니다 ㅠㅠ 샘님이랑 똑같은 환경에서 똑같은 코드로 하는건데 저만 에러나잖아요 귀찮으신건 알겠는데 뭔가 버전이 달라졌다던가 환경이 다르다던가 한거 같습니다 똑같은 환경에서 다른 강의 코드도 계속 에러 나는거 보면요 이런거는 공지를 업데이트를 해주던가 뭔가 안맞으니 강의를 딴거를 들어라 해줘야 되는거 아닌가요 저도 샘님이랑 똑같은 코드 쓰는데 계속 에러 찾다가 시간만 갑니다 ㅠ
0
답변 3