3

I have an app using npx create-react-app name. While trying to build my app using npm run build, it was interrupted with the following error.

Failed to minify the code from this file:

        ./node_modules/@mui/system/esm/style.js:9

I used the latest version of Material Ui, and it seems the error is due to a Material Ui style.js file. Please help me understand why its not possible to minify this file and what I can do to make it work.

This is the package.json, and all the Material Ui installs I did.

{
  "name": "tinder-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@emotion/react": "^11.4.1",
    "@emotion/styled": "^11.3.0",
    "@mui/icons-material": "^5.0.0",
    "@mui/material": "^5.0.0",
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/react": "^11.2.7",
    "@testing-library/user-event": "^12.8.3",
    "axios": "^0.21.4",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-scripts": "^1.1.5",
    "web-vitals": "^1.1.2"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}
possum
  • 1,837
  • 3
  • 9
  • 18
  • is this helpful for you? https://stackoverflow.com/questions/45671597/failed-to-minify-the-code-from-this-file – nima Oct 01 '21 at 09:20

0 Answers0