1

I am creating a react project using npx create-react-app experiment and I have been getting the below error, can anybody help with how to resolve it. NB, I have uninstalled global installations of create-react-app

(base) sibulele@sibulele-X555LAB:~$ npx create-react-app experiment

Creating a new React app in /home/sibulele/experiment.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

yarn add v1.22.18
info No lockfile found.
[1/4] Resolving packages...

warning react-scripts > @svgr/webpack > @svgr/plugin-svgo > svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.

[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-syntax-flow@^7.14.5".

warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-transform-react-jsx@^7.14.9".

warning "react-scripts > react-dev-utils > fork-ts-checker-webpack-plugin@6.5.2" has unmet peer dependency "typescript@>= 2.7".

warning "react-scripts > eslint-config-react-app > @typescript-eslint/eslint-plugin > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".

[4/4] Building fresh packages...
success Saved lockfile.
success Saved 745 new dependencies.
info Direct dependencies ...

Done in 377.81s.

A template was not provided. This is likely because you're using an outdated version of create-react-app.
Please note that global installs of create-react-app are no longer supported.


You can fix this by running npm uninstall -g create-react-app or yarn global remove create-react-app before using create-react-app again.
(base) sibulele@sibulele-X555LAB:~$ npm audit
found 0 vulnerabilities
(base) sibulele@sibulele-X555LAB:~$ 
gnerkus
  • 11,357
  • 6
  • 47
  • 71
Sibulele
  • 324
  • 1
  • 3
  • 12
  • did you try this: "You can fix this by running npm uninstall -g create-react-app or yarn global remove create-react-app before using create-react-app again." – Rmaxx May 17 '22 at 10:44
  • @Rmaxx yes and I do not have global installs of create-react-app – Sibulele May 17 '22 at 10:48
  • Try npm outdated to see if you need to update a package, looks like typescript is 2.7 and schould at least be 2.8 – Rmaxx May 18 '22 at 05:43

2 Answers2

1

Thank you everyone. My question has been answered by @Kayzer161 on this post This SVGO version is no longer supported. Upgrade to v2.x.x .

Here is the answer:-

create a react app by this command, npx create-react-app@latest my-app --use-npm

I had a depreciated version of "tar" and I updated it by the following command:-

sudo npm i tar

Sibulele
  • 324
  • 1
  • 3
  • 12
0

If you've previously installed create-react-app globally via npm install -g create-react-app, we recommend you uninstall the package using npm uninstall -g create-react-app to ensure that npx always uses the latest version.

Use either one of the below commands:

  • npx create-react-app my-app

  • npm init react-app my-app

  • yarn create react-app my-app

if npm uninstall -g create-react-app stated above does not work. Type where create-react-app to know where it is installed. rm -rf /usr/local/bin/create-react-app to delete manually

todevv
  • 400
  • 2
  • 11
  • Hi @todevv , thanks for answering. I have uninstalled the global installs of create-react-app using the suggested commands. I also run "which create-react-app", I get nothing. So I can safely say I do not have a global installation of create-react-app – Sibulele May 17 '22 at 10:52
  • It's not working, seems like the problem is with this warning, warning react-scripts > @svgr/webpack > @svgr/plugin-svgo > svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. – Sibulele May 17 '22 at 10:58