Yes the create-react-app is not working.
It is a known issue, reported in official repository as well.
https://github.com/facebook/create-react-app/issues/17011
So if you want to continue to create the project using create-react-app. You can use this command. It won't have testing library setup.
npx create-react-app cra --template minimal
Points to remember:
Do the following change in index.js file.
Replace
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
With
import ReactDOM from "react-dom/client";
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
node -vandnpm -vrespectively). Checking github issues might be helpful as well.npm install --save --save-exact ...command? Also, I saw you posted this question on github. I don't know what the stackoverflow best practice is, but if you get an answer there, please repost it as a solution here as well.