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

Unmet peer dependency svgo 3 in optimizer-htmlnano #8948

Closed
CxRes opened this issue Apr 18, 2023 · 6 comments · Fixed by #9969
Closed

Unmet peer dependency svgo 3 in optimizer-htmlnano #8948

CxRes opened this issue Apr 18, 2023 · 6 comments · Fixed by #9969

Comments

@CxRes
Copy link

CxRes commented Apr 18, 2023

It seems htmlnano 2.0.4 used by optimizer-htmlnano wants svgo ^3.0.2 as a peer dep. optimizer-htmlnano loads svgo 2.8.0 instead. Please update accordingly.

@mischnic
Copy link
Member

mischnic commented Apr 29, 2023

Looks like we'll have to restrict the version to <=2.0.3 though, upgrading svgo might break existing config files. https://github.com/svg/svgo/releases/tag/v3.0.0

@imbdb
Copy link

imbdb commented May 17, 2023

Is there any workaround that I can do before this can be solved?

@munkacsimark
Copy link

You can skip peer dependency check, but make sure everything is working correctly if you doing it. I encountered this using pnpm, here is the related documentation: https://pnpm.io/npmrc#strict-peer-dependencies

Put strict-peer-dependencies=false into .npmrc file.

@aiktb
Copy link

aiktb commented Nov 5, 2023

strict-peer-dependencies=false doesn't work, add the following configuration to package.json:

"pnpm": {
    "peerDependencyRules": {
      "allowedVersions": {
        "svgo": "2.8.0",
      }
    }
  },

@shallker
Copy link

shallker commented Apr 10, 2024

Another option is to tell pnpm to ignore svgo@^3.0.2 in package.json

{
  "pnpm": {
    "peerDependencyRules": {
      "ignoreMissing": [
        "svgo@^3.0.2"
      ]
    }
  }
}

@Lazerbeak12345
Copy link

Lazerbeak12345 commented Jul 10, 2024

related #9660 (the other issue may be a duplicate of this one)

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.

7 participants