PLEASE help us help you by writing a good post!
- we need to know your netlify site name. Example:
gifted-antelope-58b104.netlify.app
- DNS issues? Tell us the custom domain, tell us the error message! We can’t help if we don’t know your domain.
- Build problems? Link or paste the FULL build log & build settings screenshot
The better the post - the faster the answer.
- Build command from Netlify app
9:42:39 AM: ────────────────────────────────────────────────────────────────
9:42:39 AM:
9:42:39 AM: $ npm run build
9:42:39 AM: > stripe-menu-proj@0.1.0 build
9:42:39 AM: > react-scripts build
9:42:41 AM: /opt/build/repo/node_modules/react-scripts/config/webpack.config.js:664
9:42:41 AM: new MiniCssExtractPlugin({
9:42:41 AM: ^
9:42:41 AM: TypeError: MiniCssExtractPlugin is not a constructor
9:42:41 AM: at module.exports (/opt/build/repo/node_modules/react-scripts/config/webpack.config.js:664:9)
9:42:41 AM: at Object. (/opt/build/repo/node_modules/react-scripts/scripts/build.js:58:16)
9:42:41 AM: at Module._compile (node:internal/modules/cjs/loader:1101:14)
9:42:41 AM: at Object.Module._extensions…js (node:internal/modules/cjs/loader:1153:10)
9:42:41 AM: at Module.load (node:internal/modules/cjs/loader:981:32)
9:42:41 AM: at Function.Module._load (node:internal/modules/cjs/loader:822:12)
9:42:41 AM: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
9:42:41 AM: at node:internal/main/run_main_module:17:47
9:42:41 AM:
9:42:41 AM: ────────────────────────────────────────────────────────────────
9:42:41 AM: “build.command” failed
9:42:41 AM: ────────────────────────────────────────────────────────────────
9:42:41 AM:
9:42:41 AM: Error message
9:42:41 AM: Command failed with exit code 1: npm run build
9:42:41 AM:
9:42:41 AM: Error location
9:42:41 AM: In Build command from Netlify app:
9:42:41 AM: npm run build
9:42:41 AM:
9:42:41 AM: Resolved config
9:42:41 AM: build:
9:42:41 AM: command: npm run build
9:42:41 AM: commandOrigin: ui
9:42:41 AM: environment:
9:42:41 AM: - CI
9:42:41 AM: publish: /opt/build/repo/build
9:42:41 AM: publishOrigin: ui
9:42:41 AM: Caching artifacts
9:42:41 AM: Started saving node modules
9:42:41 AM: Finished saving node modules
9:42:41 AM: Started saving build plugins
9:42:41 AM: Finished saving build plugins
9:42:41 AM: Started saving pip cache
9:42:41 AM: Finished saving pip cache
9:42:41 AM: Started saving emacs cask dependencies
9:42:41 AM: Finished saving emacs cask dependencies
9:42:41 AM: Started saving maven dependencies
9:42:41 AM: Finished saving maven dependencies
9:42:41 AM: Started saving boot dependencies
9:42:41 AM: Finished saving boot dependencies
9:42:41 AM: Started saving rust rustup cache
9:42:41 AM: Finished saving rust rustup cache
9:42:41 AM: Started saving go dependencies
9:42:41 AM: Finished saving go dependencies
9:42:43 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:42:43 AM: Creating deploy upload records
9:42:43 AM: Failing build: Failed to build site
9:42:43 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
9:42:44 AM: Finished processing build request in 51.542026244s