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

material-ui-icons-next wrong peerDependencies #10189

Closed
nitkapawel opened this issue Feb 6, 2018 · 6 comments
Closed

material-ui-icons-next wrong peerDependencies #10189

nitkapawel opened this issue Feb 6, 2018 · 6 comments
Labels
package: icons Specific to @mui/icons

Comments

@nitkapawel
Copy link

nitkapawel commented Feb 6, 2018

Currently I'm using material-ui v0.20 and I want start the migration to v1.
As it is written on the page: https://material-ui.com/guides/migration-v0.x I've installed the package material-ui-next to have to versions of material-ui (npm install material-ui-next).

Now I want to use material-ui-icons package.
So my idea was to install the material-ui-icons-next that analogous should have the dependencies to material-ui-next not to material-ui package.

Current Behavior

npm WARN material-ui-icons-next@1.0.0-beta.17-next requires a peer of material-ui@^1.0.0-beta.16 but none was installed.

material-ui-icons-next package.json:

"peerDependencies": {
    "material-ui": "^1.0.0-beta.16",
    "react": "^15.3.0 || ^16.0.0",
    "react-dom": "^15.3.0 || ^16.0.0"
  }

Expected Behavior

material-ui-icons-next package.json:

"peerDependencies": {
    "material-ui-next": ...
}
@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 6, 2018

Current workaround: #8473 (comment)

This issue will be solved once we release Material-UI under a new npm organization in #9673. We will be able to close #9469 too.

@nitkapawel
Copy link
Author

Ok, I still have a problem with that.
My current situation:
In package.json I have:

    "material-ui": "^0.20.0",
    "material-ui-icons-next": "^1.0.0-beta.17-next",
    "material-ui-next": "^1.0.0-beta.31",

My whole app is based on v0.20, but I want to migrate all icons to material-ui-icons-next and I'm using them like this:

import {
    CheckCircle as CheckCircleIcon,
    KeyboardArrowDown as KeyboardArrowDownIcon,
    PersonOutline as PersonOutlineIcon
} from 'material-ui-icons-next';
// ...
<PersonOutlineIcon className="ico" />

And now, after the build on Bamboo I have an error:
npm ERR! peer dep missing: material-ui@^1.0.0-beta.16, required by material-ui-icons-next@1.0.0-beta.17-next

On the beginning of my App.js I've added the code that was mentioned as a workaround, but probably is not completely related to my case.

import SvgIcon from 'material-ui-next/SvgIcon';
global.__MUI_SvgIcon__ = SvgIcon;

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 6, 2018

I'm closing the issue as the pain point was solved temporarily with #9469. No need to keep it open.

@nitkapawel Why don't you do?

- "material-ui-icons-next": "^1.0.0-beta.17-next",
+ "material-ui-icons": "^1.0.0-beta.17",

@nitkapawel
Copy link
Author

There is no matter if I'm using material-ui-icons-next or material-ui-icons.
Problem appears during npm install...

npm ERR! peer dep missing: material-ui@^1.0.0-beta.16, required by material-ui-icons@1.0.0-beta.17

So the error is saying that im missing material-ui@^1.0.0-beta.16
but I have this package but on the other name (material-ui-next like it was recommended in docs).
So in my opinion in dependencies of material-ui-icons should be:
peerDependencies: material-ui@^1... OR material-ui-next@^1...
Am I right?

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 6, 2018

@nitkapawel I used to have this warning too. It should be temporary the time of the migration. At the end of the day, it's a warning reminding you to complete the migration. It's not a blocker.
You can safely ignore it.

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 6, 2018

peerDependencies: material-ui@^1... OR material-ui-next@^1...

This would suppress the warning. But I'm not convinced it's a good thing.
Especially given the situation is already pretty ugly with:

import SvgIcon from 'material-ui-next/SvgIcon';
global.__MUI_SvgIcon__ = SvgIcon;

@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 20, 2022
@zannager zannager added package: icons Specific to @mui/icons and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: icons Specific to @mui/icons
Projects
None yet
Development

No branches or pull requests

3 participants