치악산 복숭아

[error] Cannot use JSX unless the '--jsx' flag is provided. 본문

FE

[error] Cannot use JSX unless the '--jsx' flag is provided.

Juliie 2022. 4. 4. 02:23

tsconfig 설정이 제대로 되지 않아서 발생한 문제였다!

tsconfig.json 파일의 compiledOptions에

"jsx": "react"

추가해서 해결 완료! 경우에 따라서 vscode를 재실행하는 과정이 필요할 수 있다

 

https://stackoverflow.com/questions/50432556/cannot-use-jsx-unless-the-jsx-flag-is-provided?rq=1 

 

Cannot use JSX unless the '--jsx' flag is provided

I have looked around a bit for a solution to this problem. All of them suggest adding "jsx": "react" to your tsconfig.json file. Which I have done. Another one was to add "include: []", which I hav...

stackoverflow.com

 

 

'FE' 카테고리의 다른 글

[error] ERR! stack Error: `gyp` failed with exit code: 1  (0) 2020.10.10
[error] webpack: command not found  (0) 2020.10.09
Comments