250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 기준
- 삶
- tailwindcss
- HTML
- express.js
- nextJS
- CSS
- Redux
- graphQL
- Interface
- typeScript
- Ethereum
- web
- SSR
- node.js
- REACT
- evm
- JavaScript
- middleware
- error
- Props
- concept
- CLASS
- API
- useState
- solidity
- built in object
- hardhat
- blockchain
- bitcoin
Archives
- Today
- Total
ReasonJun
Nextjs : Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (ts-node) 본문
Frontend/Next.js
Nextjs : Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (ts-node)
ReasonJun 2023. 11. 6. 13:50728x90
What happened?
In the case of ts-node, ts was compiled using the commonJS method. Therefore, an error occurs when you try to run a ts file with ts-node in the app or src subfolder of nextjs, which is compiled with esNext.
Error :
https://github.com/TypeStrong/ts-node/issues/935
Solution :
https://www.npmjs.com/package/ts-node?activeTab=readme#commonjs
728x90
'Frontend > Next.js' 카테고리의 다른 글
Comments