Skip to content
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

Update SVGO to fix deprecation dependency warning #84

Open
felixranesberger opened this issue Feb 4, 2023 · 9 comments · May be fixed by #108
Open

Update SVGO to fix deprecation dependency warning #84

felixranesberger opened this issue Feb 4, 2023 · 9 comments · May be fixed by #108

Comments

@felixranesberger
Copy link

On installation of this package, a warning occurs.
This should be fixable by updating SVGO to a newer version, since the deprecated dependency stable seems
updated to a newer version in SVGO v3.

Screenshot 2023-02-04 at 18 40 04

Screenshot 2023-02-04 at 18 40 16

@jonkab
Copy link

jonkab commented May 2, 2024

Hello,
I have a similar problem.
Has anyone resolved the problem?
Thanks in advance.

image

@felixranesberger
Copy link
Author

You could try using overrides to update svgo internally yourself.
Could look something like this:

"overrides": {
    "vite-plugin-svg-icons": {
      "svgo": "~3.0.0"
    }
  }

Haven't tried or tested it though.
If this works for you, it would be awesome if you could give me some feedback with your current implementation of the fix,
because I'm also facing the issue currently :)

@jonkab
Copy link

jonkab commented May 2, 2024

Thank you 🙏 for your suggestion!
But unfortunately 😞 that doesn't seem to work either.

Code package.json

{
  "name": "vite-starter",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "devDependencies": {
    "vite": "^5.2.10"
  },
  "dependencies": {
    "vite-plugin-svg-icons": "^2.0.1"
  },
  "overrides": {
    "vite-plugin-svg-icons": {
      "svgo": "~3.0.0"
    }
  }
}

obtained result
image

@felixranesberger
Copy link
Author

felixranesberger commented May 2, 2024

This could work:

"overrides": {
    "svg-baker": {
      "micromatch": "^4.0.0"
    }
  }

(svgo wasn't the problem but a sub-sub-dependency of svg-baker)

@jonkab
Copy link

jonkab commented May 3, 2024

Well done ! Indeed ! 👍
But there is still the [email protected] library which is causing problems now.🤔

package.json

{
  "name": "vite-starter",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "devDependencies": {
    "vite": "^5.2.10"
  },
  "dependencies": {
    "vite-plugin-svg-icons": "^2.0.1"
  },
  "overrides": {
    "svg-baker": {
      "micromatch": "^4.0.0"
    }
  }
}

Screenshot
image

@felixranesberger
Copy link
Author

This should fix it

"overrides": {
    "svg-baker": {
      "micromatch": "^4.0.0"
    },
    "vite-plugin-svg-icons": {
      "svgo": "^3.2.0"
    }
  }

@jonkab
Copy link

jonkab commented May 3, 2024

It's still the same error, I don't know why.

package.json

{
  "name": "vite-starter",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "devDependencies": {
    "vite": "^5.2.10"
  },
  "dependencies": {
    "vite-plugin-svg-icons": "^2.0.1"
  },
  "overrides": {
    "svg-baker": {
      "micromatch": "^4.0.0"
    },
    "vite-plugin-svg-icons": {
      "svgo": "^3.2.0"
    }
  }
}

Screenshot
image

@felixranesberger
Copy link
Author

felixranesberger commented May 3, 2024

Weird, did you try removing the node_modules and running npm install again?
I tried it on my project and I don't get the warning.
Haven't tried if it works yet though.

@felixranesberger
Copy link
Author

Could you resolve your error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants