2

I am running "npx create-react-app experiment" to create a new project and I get this warning. How can I solve it? I have been researching but I get nothing

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
  • 324
  • 1
  • 3
  • 12

3 Answers3

11

I encountered this error while installing dependencies (npm install) for an existing projects

and solved this by installing svgo globally using the command below:

npm install -g svgo

or

npm i -g svgo

hope this helps :)

Sajeel Hassan
  • 314
  • 3
  • 8
  • 1
    Thanks buddy, I decided to delete everything and do fresh installations. I hope this helps someone else who is stuck here as well – Sibulele Aug 02 '22 at 12:02
2

This below command line helped me when I was creating my react app, try it.

npx create-react-app@latest my-app --use-npm

Sibulele
  • 324
  • 1
  • 3
  • 12
Kayzer161
  • 11
  • 2
1

After a long struggle, I solved the problem and I wanted to share it with you.

Firstly , you should sure updated all npm packages. For this you can use "npm outdated" command. After that you updated all packages.
second step , "npx ncu" npx ncu stands for "npm check updates". It is a command line tool used to check the outdated dependencies in a Node.js project. This command will list the packages that have newer versions available and allows you to upgrade them to the latest version.

My error after this command is that I need to update @types/react version. It may be different for you, but you need to complete the all updates with the "npx ncu" command.

The easiest way to solve is change the version that "npx ncu" command says, in "package.json" and install npm

sample my case;
@types/react ^18.0.26 → ^18.0.27

hope it helps

  • `npx ncu` gives a Warning: ``` npm WARN deprecated ncu@0.2.1: This package has been deprecated, and this is not npm-check-updates NCU Real Time Weather is Running...... 2023/2/14 14:17 Tuesday UTC+8:00 ``` the correct command appears to be `npx npm-check-updates` – Rayanth Feb 14 '23 at 22:19