postcss-preset-mantine icon indicating copy to clipboard operation
postcss-preset-mantine copied to clipboard

Dependency conflicts with vite7

Open joshlangs opened this issue 5 months ago • 4 comments

Vite7 has been released.

However, installing postcss-preset-mantine causes npm install to fail with dependency problems.

To reproduce:

npm create vite@latest my-vue-app -- --template react-ts
cd my-vue-app
npm install postcss-preset-mantine

The error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/sugarss
npm ERR!   sugarss@"^4.0.1" from [email protected]
npm ERR!   node_modules/postcss-mixins
npm ERR!     postcss-mixins@"^9.0.4" from [email protected]
npm ERR!     node_modules/postcss-preset-mantine
npm ERR!       postcss-preset-mantine@"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional sugarss@"^5.0.0" from [email protected]
npm ERR! node_modules/vite
npm ERR!   dev vite@"^7.0.0" from the root project
npm ERR!   peer vite@"^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0" from @vitejs/[email protected]
npm ERR!   node_modules/@vitejs/plugin-react
npm ERR!     dev @vitejs/plugin-react@"^4.5.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/sugarss
npm ERR!   peerOptional sugarss@"^5.0.0" from [email protected]
npm ERR!   node_modules/vite
npm ERR!     dev vite@"^7.0.0" from the root project
npm ERR!     peer vite@"^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0" from @vitejs/[email protected]
npm ERR!     node_modules/@vitejs/plugin-react
npm ERR!       dev @vitejs/plugin-react@"^4.5.2" from the root project

joshlangs avatar Jun 27 '25 23:06 joshlangs

postcss-mixins needs to update. Because the [email protected] release's breaking change is just removal of node 16 support (source), you can override it for now with this in your package.json as long as you're using a later node version

  "overrides": {
    "postcss-mixins": {
      "sugarss": "^5.0.0"
    }
  }

Enoz avatar Jun 28 '25 01:06 Enoz

Yep, your fix works. Thanks. Will use it until packages update.

joshlangs avatar Jun 28 '25 15:06 joshlangs

postcss-mixins needs to update. Because the [email protected] release's breaking change is just removal of node 16 support (source), you can override it for now with this in your package.json as long as you're using a later node version

"overrides": { "postcss-mixins": { "sugarss": "^5.0.0" } }

From what I saw the issue is that postcss-preset-mantine is dependent on postcss-mixins 9, when version 12 is available.

If the postcss-mixins dependency is bumped to version 12 it will sort itself out. Node 16 is EOL so no longer relevant.

The overrides fix works in the interim as a band-aid.

robvdl avatar Jun 30 '25 10:06 robvdl

I've publiblished 1.18.0 with the updated dependency, please install the new version and validate that it works for you

rtivital avatar Jun 30 '25 11:06 rtivital