Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 정규표현식
- REACTJS
- spring cloud
- mysql 5.5
- expire_logs_days
- 퀵소트
- spring
- JavaScript
- Spring Batch
- Express
- git
- Effective Java 3/e
- regex
- Webpack
- eslint
- update
- REACT
- npm
- migration
- nodejs
- log4j2
- Regular expression
- upgrade
- java
- Effective Java
- current_date
- Chunk
- Node
- log_bin
- MySQL
Archives
- Today
- Total
728x90
목록NestJS (1)
728x90
내 세상
[NestJS] mysql connection pool Cannot read properties of undefined 이슈 조치
NestJS + mysql2 사용시, mysql 객체가 TypeError: Cannot read properties of undefined (reading 'createPool') 에러가 발생하는 경우가 있음. import mysql from "mysql2/promise";const _dbConn = mysql.createPool({});export { _dbConn }; 위와 같이 구현한 경우에 해당 에러가 발생함. 조치 방법은 아래와 같이 as로 import 구문을 변경해주면 됨. import * as mysql from "mysql2/promise";const _dbConn = mysql.createPool({});export { _dbConn };
Technical/NodeJS
2024. 7. 4. 07:08