Basically spent half a day trying to set this up with no luck.
I have been using npx create-react-app
like in this video but I receive the following:
Installing template dependencies using npm...
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: testfile@0.1.0
npm ERR! Found: react@18.0.0
npm ERR! node_modules/react
npm ERR! react@"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"<18.0.0" from @testing-library/react@12.1.5
broken) dependency resolution.
npm ERR! the root project
I have seen here create-react-app dependency version issues with React 18 that there may be dependency issues. I have tried the following fix from the post:
- delete both node_modules and package-lock.json
- run
npm i web-vitals --save-dev
- run
npm install
- and then you can use
npm run build
andnpm start
again
But I am still receiving error messages. I also uninstalled node.js and installed v16.14.2.
Any help would be really appreciated...
Many thanks