Skip to content
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

After upgrading to React 18 version and CRA 5 can not make a build #12652

Open
sadashiv-sumasoft opened this issue Aug 10, 2022 · 1 comment
Open

Comments

@sadashiv-sumasoft
Copy link

My React application code compiled successfully but when hit yarn build command failed with following error.

Module not found: Error: Can't resolve 'D:/projects/updateui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js' in 'D:\projects\updateui\src\components'

I have upgrade my application React 16 and CRA 4 to React 18 and CRA 5.
Any suggestion will be appreciated.

@thakuranujsingh
Copy link

delete the node_modules and lock file and then npm install

check this as well
// Before
import { render } from 'react-dom';
const container = document.getElementById('app');
render(, container);

// After
import { createRoot } from 'react-dom/client';
const container = document.getElementById('app');
const root = createRoot(container); // createRoot(container!) if you use TypeScript
root.render();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants