-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Issue creating new project #12280
Comments
I have the same error |
Create react app is broken at the moment: #12278 |
I found the solution. create-react-app is not updating index.js as per the new react V18 so you need to modify index.js file as follow import React from 'react'; const container = document.getElementById('root'); root.render( // If you want to start measuring performance in your app, pass a function |
Here is the contents of import React from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import App from "./App";
// import reportWebVitals from './reportWebVitals';
const container = document.getElementById("root");
const root = createRoot(container);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById("root")
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
// reportWebVitals(); |
When rerunning the create-react-app command on the website I now get a corrected installation. Good to go. |
Hello everyone, and thanks for helping. Here is the information you'll need.
The command doesn't work from the website. I'm not new to react, and this is a brand new project. I only did
git init
prior to running this command in a fresh directory.Versions:
Output:
The text was updated successfully, but these errors were encountered: