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
- HTML
- solidity
- SSR
- concept
- node.js
- typeScript
- 기준
- Interface
- hardhat
- 삶
- Ethereum
- API
- Redux
- bitcoin
- built in object
- evm
- graphQL
- REACT
- web
- express.js
- CSS
- Props
- JavaScript
- middleware
- CLASS
- nextJS
- useState
- blockchain
- tailwindcss
- error
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