-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Conversation
Netlify deploy previewhttps://deploy-preview-40854--material-ui.netlify.app/ Bundle size report |
@@ -89,6 +89,7 @@ | |||
"peerDependencies": { | |||
"@emotion/react": "^11.5.0", | |||
"@emotion/styled": "^11.3.0", | |||
"@mui/zero-runtime": "workspace:^", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
}
},
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
960e2bb
to
9c84550
Compare
This requires adding zero runtime as a peer dep of material (at least when using pnpm)
9c84550
to
d32c257
Compare
This requires adding zero runtime as a peer dep of material (at least when using pnpm). Otherwise getting this error -