Module not found: Error: Can't resolve 'react/jsx-runtime' #408
Unanswered
abhishek-rohan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using below packages for my application.
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-idle-timer": "^5.7.2",
Failed to compile.
Module not found: Error: Can't resolve 'react/jsx-runtime' in '/usr/src/app/node_modules/react-idle-timer/dist'
Did you mean 'jsx-runtime.js'?
BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
I was exploring around it but no concrete fix is available.
I have used - postinstall script and importing legacy but not working.
Another suggestion is to upgrade webpack version => in my case need to upgrade react version which i do not want to.
Please help if someone have someone has faced the same and have some workaround or fix?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions