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 · 1 comment
Open

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

bdruth opened this issue Jan 12, 2025 · 1 comment
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

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