Home
Support Forums

CSS Conflicting Order Failed Build

Hi,

My site is suddenly failing to build. It even fails to redeploy the published version. The published version was pushed 3 days ago. When I build it locally, it builds without errors. Did something change or did something happening on the Netlify side? My log for the redeploy can be found below.

Thanks in advance!

1:00:23 PM: Build ready to start
1:00:25 PM: build-image version: dd2f6d8803393d46ac35a4f752a5a46f254c0300
1:00:25 PM: build-image tag: v3.9.1
1:00:25 PM: buildbot version: 050f5e521c0d810d56330c3a7d48687a1932379d
1:00:25 PM: Fetching cached dependencies
1:00:25 PM: Starting to download cache of 507.6MB
1:00:28 PM: Finished downloading cache in 3.505036634s
1:00:28 PM: Starting to extract cache
1:00:44 PM: Finished extracting cache in 15.935052362s
1:00:45 PM: Finished fetching cache in 19.913011228s
1:00:45 PM: Starting to prepare the repo for build
1:00:45 PM: Preparing Git Reference refs/heads/master
1:00:47 PM: Parsing package.json dependencies
1:00:47 PM: Starting build script
1:00:47 PM: Installing dependencies
1:00:47 PM: Python version set to 2.7
1:00:48 PM: Started restoring cached node version
1:00:50 PM: Finished restoring cached node version
1:00:51 PM: v12.18.0 is already installed.
1:00:52 PM: Now using node v12.18.0 (npm v6.14.4)
1:00:52 PM: Started restoring cached build plugins
1:00:52 PM: Finished restoring cached build plugins
1:00:52 PM: Attempting ruby version 2.7.1, read from environment
1:00:52 PM: Started restoring cached ruby version
1:00:52 PM: Finished restoring cached ruby version
1:00:54 PM: Using ruby version 2.7.1
1:00:55 PM: Using PHP version 5.6
1:00:55 PM: Started restoring cached node modules
1:00:55 PM: Finished restoring cached node modules
1:00:55 PM: Started restoring cached go cache
1:00:55 PM: Finished restoring cached go cache
1:00:55 PM: go version go1.14.4 linux/amd64
1:00:55 PM: go version go1.14.4 linux/amd64
1:00:55 PM: Installing missing commands
1:00:55 PM: Verify run directory
1:00:56 PM: ​
1:00:56 PM: ────────────────────────────────────────────────────────────────
1:00:56 PM: Netlify Build
1:00:56 PM: ────────────────────────────────────────────────────────────────
1:00:56 PM: ​
1:00:56 PM: ❯ Version
1:00:56 PM: @netlify/build 18.13.9
1:00:56 PM: ​
1:00:56 PM: ❯ Flags
1:00:56 PM: baseRelDir: true
1:00:56 PM: buildId: 615e0057ed6e5f00dc04d835
1:00:56 PM: deployId: 615e0057ed6e5f00dc04d837
1:00:56 PM: ​
1:00:56 PM: ❯ Current directory
1:00:56 PM: /opt/build/repo
1:00:56 PM: ​
1:00:56 PM: ❯ Config file
1:00:56 PM: No config file was defined: using default values.
1:00:56 PM: ​
1:00:56 PM: ❯ Context
1:00:56 PM: production
1:00:56 PM: ​
1:00:56 PM: ────────────────────────────────────────────────────────────────
1:00:56 PM: 1. Build command from Netlify app
1:00:56 PM: ────────────────────────────────────────────────────────────────
1:00:56 PM: ​
1:00:56 PM: $ npm run build
1:00:57 PM: > client-camera@0.1.0 build /opt/build/repo
1:00:57 PM: > react-scripts build
1:00:58 PM: Creating an optimized production build…
1:02:41 PM:
1:02:41 PM: Treating warnings as errors because process.env.CI = true.
1:02:41 PM: Most CI servers set it automatically.
1:02:41 PM:
1:02:41 PM: Failed to compile.
1:02:41 PM:
1:02:41 PM: chunk 10 [mini-css-extract-plugin]
1:02:41 PM: Conflicting order. Following module has been added:
1:02:41 PM: * css ./node_modules/css-loader/dist/cjs.js??ref–5-oneOf-4-1!./node_modules/postcss-loader/src??postcss!./node_modules/katex/dist/katex.min.css
1:02:41 PM: despite it was not able to fulfill desired ordering with these modules:
1:02:41 PM: * css ./node_modules/css-loader/dist/cjs.js??ref–5-oneOf-4-1!./node_modules/postcss-loader/src??postcss!./src/components/Graph/styles.css
1:02:41 PM: - couldn’t fulfill desired order of chunk group(s)
1:02:41 PM: chunk 10 [mini-css-extract-plugin]
1:02:41 PM: Conflicting order. Following module has been added:
1:02:41 PM: * css ./node_modules/css-loader/dist/cjs.js??ref–5-oneOf-4-1!./node_modules/postcss-loader/src??postcss!./src/components/Latex/styles.css
1:02:41 PM: despite it was not able to fulfill desired ordering with these modules:
1:02:41 PM: * css ./node_modules/css-loader/dist/cjs.js??ref–5-oneOf-4-1!./node_modules/postcss-loader/src??postcss!./src/components/Graph/styles.css
1:02:41 PM: - couldn’t fulfill desired order of chunk group(s)
1:02:41 PM: npm ERR! code ELIFECYCLE
1:02:41 PM: npm ERR! errno 1
1:02:41 PM: npm ERR! client-camera@0.1.0 build: react-scripts build
1:02:41 PM: npm ERR! Exit status 1
1:02:41 PM: npm ERR!
1:02:41 PM: npm ERR! Failed at the client-camera@0.1.0 build script.
1:02:41 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
1:02:41 PM: npm ERR! A complete log of this run can be found in:
1:02:41 PM: npm ERR! /opt/buildhome/.npm/_logs/2021-10-06T20_02_41_533Z-debug.log
1:02:41 PM: ​
1:02:41 PM: ────────────────────────────────────────────────────────────────
1:02:41 PM: “build.command” failed
1:02:41 PM: ────────────────────────────────────────────────────────────────
1:02:41 PM: ​
1:02:41 PM: Error message
1:02:41 PM: Command failed with exit code 1: npm run build
1:02:41 PM: ​
1:02:41 PM: Error location
1:02:41 PM: In Build command from Netlify app:
1:02:41 PM: npm run build
1:02:41 PM: ​
1:02:41 PM: Resolved config
1:02:41 PM: build:
1:02:41 PM: command: npm run build
1:02:41 PM: commandOrigin: ui
1:02:41 PM: environment:
1:02:41 PM: - REACT_APP_AWS_HELPER_URL
1:02:41 PM: publish: /opt/build/repo/build
1:02:41 PM: publishOrigin: ui
1:02:41 PM: Caching artifacts
1:02:41 PM: Started saving node modules
1:02:41 PM: Finished saving node modules
1:02:41 PM: Started saving build plugins
1:02:41 PM: Finished saving build plugins
1:02:41 PM: Started saving pip cache
1:02:42 PM: Finished saving pip cache
1:02:42 PM: Started saving emacs cask dependencies
1:02:42 PM: Finished saving emacs cask dependencies
1:02:42 PM: Started saving maven dependencies
1:02:42 PM: Finished saving maven dependencies
1:02:42 PM: Started saving boot dependencies
1:02:42 PM: Finished saving boot dependencies
1:02:42 PM: Started saving rust rustup cache
1:02:42 PM: Finished saving rust rustup cache
1:02:42 PM: Started saving go dependencies
1:02:42 PM: Finished saving go dependencies
1:02:42 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
1:02:42 PM: Creating deploy upload records
1:02:42 PM: Failing build: Failed to build site
1:02:42 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
1:02:42 PM: Finished processing build request in 2m17.226017539s

Looks like mini-css-extract-plugin was added to the Netlify Build Cycle. I moved my import ‘.css’ to the end of my imports to solve this issue.