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

[Bug] build fails because of an issue in material UI #18

Open
bdruth opened this issue Jan 12, 2025 · 6 comments
Open

[Bug] build fails because of an issue in material UI #18

bdruth opened this issue Jan 12, 2025 · 6 comments
Assignees

Comments

@bdruth
Copy link

bdruth commented Jan 12, 2025

Bug Description

running pnpm run build fails with a vite error due to an issue with the @mui/material version

[vite]: Rollup failed to resolve import "@mui/system/Unstable_Grid" from "/home/bruth/AppFlowy-Web/node_modules/@mui/material/Unstable_Grid2/Grid2.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`

Steps to Reproduce

  1. clone the project at commit 4c71e62 (current main)
  2. make build

Expected Behavior

make build should succeed, ideally without warnings, but we'll settle for without errors :)

Browser and Version

n/a

AppFlowy Version(s)

4c71e62 (close to 0.1.1)

Screenshots

No response

Logs and Console Output

[vite]: Rollup failed to resolve import "@mui/system/Unstable_Grid" from "/home/bruth/AppFlowy-Web/node_modules/@mui/material/Unstable_Grid2/Grid2.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`

Additional Context

As vite is indicating when it's blowing up on - Grid2.js - @mui/system/Unstable_Grid doesn't exist at this version of @mui/material - switching from 6.0.0-alpha.2 to 6.0.0 seems to fix it, though. The current version of @mui/material is 6.3.1 which also appears to build successfully - whether it "works" I don't know - I haven't run things locally to try them out yet.

@qinluhe
Copy link
Collaborator

qinluhe commented Jan 13, 2025

Before building, make sure you copy package.json and pnpm-lock.yaml to the directory. @khorshuheng

@khorshuheng
Copy link
Collaborator

@bdruth Which version of Node and pnpm are you using?

@bdruth
Copy link
Author

bdruth commented Jan 14, 2025

@khorshuheng

  • node: v22.13.0
  • pnpm: 10.0.0

@khorshuheng
Copy link
Collaborator

We are developing based on pnpm 8.5. I will see if i can reproduce the issue with the versions of node and pnpm specified above.

@bdruth
Copy link
Author

bdruth commented Jan 15, 2025

Just a recommendation - it doesn't get any easier down the road to get dependabot or renovate bot setup to auto-bump dependencies and incrementally refactor things as you notice that certain dependencies keep releasing breaking changes ... at some point, you'll be overwhelmed.

@qinluhe
Copy link
Collaborator

qinluhe commented Jan 17, 2025

Thank you for your recommendation regarding pnpm updates. We've decided to be cautious with pnpm version upgrades for now, as major versions often introduce breaking changes that could potentially impact our codebase stability.

However, we appreciate your suggestion about dependency management. We plan to implement a Dependabot configuration specifically for pnpm that will:

  • Monitor pnpm version updates
  • Create separate issues for each significant update
  • Allow us to carefully evaluate and test changes before implementation
  • This approach will help us maintain better control over the upgrade process while ensuring system stability. We'll focus on incremental updates and thorough testing when new versions are released.

Thanks again for bringing this to our attention!

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

No branches or pull requests

3 participants