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

[zero] Fix build for demo next.js app #40854

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

brijeshb42
Copy link
Contributor

This requires adding zero runtime as a peer dep of material (at least when using pnpm). Otherwise getting this error -

Screenshot 2024-01-30 at 2 20 44 PM

@brijeshb42 brijeshb42 added the package: pigment-css Specific to @pigment-css/* label Jan 30, 2024
@mui-bot
Copy link

mui-bot commented Jan 30, 2024

Netlify deploy preview

https://deploy-preview-40854--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against d32c257

@@ -89,6 +89,7 @@
"peerDependencies": {
"@emotion/react": "^11.5.0",
"@emotion/styled": "^11.3.0",
"@mui/zero-runtime": "workspace:^",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is the right approach but I think the current error only affects when used with pnpm.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think optional is needed as well?

"peerDependenciesMeta": {
    
    "@mui/zero-runtime": {
      "optional": true
    }
  },

Copy link
Member

@oliviertassinari oliviertassinari Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm automatically install none optional peer dependencies https://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli/#user-content-exciting-new-features since v7, leading to #40969. I think Jun was right.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did make the changes but seems I ended up pushing to a different branch. Fixing this.

This requires adding zero runtime as a peer dep of material
(at least when using pnpm)
@brijeshb42 brijeshb42 merged commit 90f655a into mui:master Feb 6, 2024
19 checks passed
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Feb 6, 2024
@oliviertassinari oliviertassinari added the package: system Specific to @mui/system label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: pigment-css Specific to @pigment-css/* package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants