-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Since version 2.0.0-beta.14 including app throw exception on React 17.0.2 #288
Comments
Hey @tmarinov82, can I check what you've tried so far (e.g. remove node_modules and do a clean reinstall)? It will also help if you can provide the full package.json file and your bundler configurations. |
I created React app with create react app and downgrade to 17.0.2 which is our production version. I wanted to test the package in isolation. Here is package.json: |
Hmmm, as a sanity check, are you able to try vite instead of create-react-app? |
I can but our project is build with create react app and this won't be a solution for us. I even can't upgrade to react 18 |
I did a little digging, it seems like this is due to how CRA specifically handles resolving of imports (requires extension). A possible workaround would be to modify webpack config as follows:
Are you able to give this a try? |
It doesn't work for me if I just add it to resolve section of the webpack file. Would you provide a working version of webpack file which fix this issue? |
I just tested to upgrade to React 18.3.1 and it fixed the issue, but I cannot upgrade it in our production environment. |
@tmarinov82 To be frank I'm not sure if there's much I can do on my end since this is pretty much a CRA specific issue 😢 A naive solution that comes to mind is to directly add the |
Bug Description:
Since version 2.0.0-beta.14 including app throw exception on React 17.0.2
Steps To Reproduce:
Steps to reproduce the bug behavior:
ERROR in ./node_modules/react-chatbotify/dist/index.js 2:0-72
Module not found: Error: Can't resolve 'react/jsx-runtime' in 'C:\GitRepos\test\my-app3\node_modules\react-chatbotify\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.
ERROR in ./node_modules/react-chatbotify/dist/index.js 5:0-34
Module not found: Error: Can't resolve 'react-dom/server' in 'C:\GitRepos\test\my-app3\node_modules\react-chatbotify\dist'
Did you mean 'server.browser.js'?
BREAKING CHANGE: The request 'react-dom/server' 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.
Library version:
2.0.0-beta.14 till the latest
Software Stack:
"react": "^17.0.2",
"react-chatbotify": "^2.0.0-beta.26",
"react-dom": "^17.0.2",
"react-scripts": "5.0.1",
The text was updated successfully, but these errors were encountered: