Home
Support Forums

React site won't publish for me!

I need advice to debug deploy Netlify App.

it builds locally with yarn start.

everything is fine until here about:
11:16:31 AM: $ react-scripts build
11:16:33 AM: (node:1550) [DEP0148] DeprecationWarning: Use of deprecated folder mapping “./” in the “exports” field module resolution of the package at /opt/build/repo/node_modules/postcss-safe-parser/node_modules/postcss/package.json.
11:16:33 AM: Update this package.json to use a subpath pattern like “./*”.
11:16:33 AM: (Use node --trace-deprecation ... to show where the warning was created)
11:16:33 AM: Creating an optimized production build…
11:16:34 AM: Browserslist: caniuse-lite is outdated. Please run:
11:16:34 AM: npx browserslist@latest --update-db
11:16:34 AM: Why you should do it regularly:
11:16:34 AM: GitHub - browserslist/browserslist: 🦔 Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env
11:16:38 AM: Failed to compile.
11:16:38 AM:
11:16:38 AM: ./src/components/Header.js
11:16:38 AM: Cannot find module: ‘@mui/icons-material/Menu’. Make sure this package is installed.
11:16:38 AM: You can install this package by running: yarn add @mui/icons-material/Menu.
11:16:39 AM: error Command failed with exit code 1.
11:16:39 AM: info Visit yarn run | Yarn for documentation about this command.
11:16:39 AM: ​
11:16:39 AM: ────────────────────────────────────────────────────────────────
11:16:39 AM: “build.command” failed
11:16:39 AM: ────────────────────────────────────────────────────────────────
11:16:39 AM: ​
11:16:39 AM: Error message
11:16:39 AM: Command failed with exit code 1: yarn build
11:16:39 AM: ​
11:16:39 AM: Error location
11:16:39 AM: In Build command from Netlify app:
11:16:39 AM: yarn build
11:16:39 AM: ​
11:16:39 AM: Resolved config
11:16:39 AM: build:
11:16:39 AM: command: yarn build
11:16:39 AM: commandOrigin: ui

The problem is outlined in the build log, actually. You’re trying to use a package that isn’t installed. You can fix this by running yarn add @mui/icons-material/Menu

1 Like