Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when running next js - TypeError: (0 , react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV) is not a function

I just created a next project, and when I start the server, I have this error, but without more information. I didn't find any solution :(

TypeError: (0 , react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV) is not a function

Reported error

like image 887
Willian Ferreira Avatar asked May 03 '21 21:05

Willian Ferreira


1 Answers

As @ggnoredo has said you only get the error when your "NODE_ENV" environment variable is set to "production". So on windows the error can be fixed by running setx NODE_ENV dev and on linux and macos by runnuing export NODE_ENV=dev.

like image 58
Joseph Abbey Avatar answered Nov 17 '22 06:11

Joseph Abbey