NodeJS3 SyntaxError: Cannot use import statement outside a module 에러 import mysql from "mysql2/promise"; 위 구문 부분에서 에러가 발생했다고 나온다 해결법 위에서처럼 package.json 에서 "type": "module" 부분을 추가하니까 정상적으로 실행된다 2023. 7. 18. node pkg의 exe 생성 명령어 pkg -t win batch_txt.js --debug pkg -t win --debug -c package.json exec.js -o exec.exe --no-bytecode 2022. 11. 8. NPM 이용시 "must use TLS 1.2 or higher" 메시지 해결 npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher npm 을 이용하여 패키지를 설치할때 위와 같은 메시지가 나올때가 있다 npm config set registry https://registry.npmjs.org/ 위와 같은 명령어를 입력하여 해결이 가능하다 기존의 주소가 http 에서 https 로 바뀌어 해결되게 된다. 2022. 8. 20. 이전 1 다음