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

mini-css-extract-plugin throws "Conflicting order" errors during build #5372

Open
dviry opened this issue Oct 9, 2018 · 105 comments
Open

mini-css-extract-plugin throws "Conflicting order" errors during build #5372

dviry opened this issue Oct 9, 2018 · 105 comments

Comments

@dviry
Copy link

dviry commented Oct 9, 2018

(react-scripts 2.0.4)
Same as in this issue I am getting a lot of errors from the mini-css-extract-plugin when doing a CI build - which fails since no warnings are allowed.
Since CRA does not allow customizing the WebPack plugin config, I cannot use the warningsFilters and the question about CRA also already popped up.

I am not sure what the CRA team can do about this - but maybe just keep an eye on it (or have it documented as a Known Issue) until WebPack somehow solves it.

PS: for now I am running "set CI=&&react-scripts build" to disable the CI build warnings limit.

@andriijas
Copy link
Contributor

Are you using 3rd party styling library like antd, bootstrap or anything else?

Like mentioned in the related issue webpack-contrib/mini-css-extract-plugin#250 (comment) the problem should not just be ignored by disabling and hiding the warnings but addressing the source cause instead, its not healthy to have fragile and inconsistent builds.

@holloway
Copy link
Contributor

holloway commented Oct 14, 2018

@dviry fyi I solved this by importing all CSS from a single file, and for code-split styles I'll migrate to a CSS-in-JS approach (probably Glamor styled-components).

@Timer
Copy link
Contributor

Timer commented Oct 15, 2018

Yeah, this is a very valid problem. A light change in your code could alter the cascading effects of your CSS, so this is warranted. Maybe some docs on how to fix it would be nice.

@ryancogswell
Copy link
Contributor

@Timer This seems like more than a documentation problem. I'm working on un-ejecting, but couldn't before 2.0 because of using Sass and CSS modules. Now with 2.0, I'm getting a bunch of these warnings, but we are using CSS modules for everything so there's no chance of the order actually being important (we aren't using any global styles -- just CSS classes).

@ryancogswell
Copy link
Contributor

In our case, I've worked around this by importing within index.js the components that directly use the CSS files that the warnings were complaining about. This resolves the order ambiguity and in my case, the components are shared pieces that are fine to be in my "main" chunk.

@Timer Timer removed this from the 2.x milestone Nov 2, 2018
@bogdan-calapod
Copy link

I also have this problem, and the error message is utterly useless and frustrating. On a large project it isn't feasible to randomly start requiring the devs to update their CSS based on arbitrary rules.

I'm using this with SCSS, and I'm even more confused on what it wants from me. The linked issue doesn't help much either.

@stereobooster
Copy link
Contributor

chunk 0 [mini-css-extract-plugin]
Conflicting order between:
 * css ./node_modules/css-loader??ref--6-oneOf-4-1!./node_modules/postcss-loader/src??postcss!./src/form.module.css
 * css ./node_modules/css-loader??ref--6-oneOf-4-1!./node_modules/postcss-loader/src??postcss!./src/components/Footer/Footer.module.css

We use CSS Modules. The problem is in our code, but it is hard to understand what exactly is the issue. It complains about order of css imports in asset graph, but which exactly files?

Related webpack-contrib/mini-css-extract-plugin#250

@theZieger
Copy link

I also had an issue with the mini-css-extract-plugin warning about a confliction order. Good thing was I'm in complete control of the component library we are using. But finding the correct spot where the problem occurs was really tough. I'm not an expert regarding webpack and neither the mini-css-extract-plugin or any of this. That's why I use CRA in the first place - I don't want to deal in detail with webpack and it's plugin ecosystem.

Nonetheless I was able to fix my component library. I'll just leave this here, so it may be some help to others hopefully.

Before the change:

BaseButton.js

import React from 'react';
import classnames from '../../../classnames';

import '../../../global/Global.css';
import './BaseButton.css';

export default function BaseButton({ children, type, className, ...other }) {
  return (
    <button
      className={classnames('base-button', className)}
      type={type}
      {...other}
    >
      {children}
    </button>
  );
}
BaseButton.defaultProps = {
  /** the type of the button */
  type: 'button'
};

IconButton.js

import React from 'react';

import BaseButton from '../BaseButton/BaseButton';
import classnames from '../../../classnames';

import '../../../global/Global.css';
import './IconButton.css';

export default function IconButton({ className, ...props }) {
  return (
    <BaseButton className={classnames('icon-button', className)} {...props} />
  );
}

When I used the components in that way, the CSS generated on build was not in the order I suspected it to be. When looking at the code of IconButton.js I would assume that the build process would put BaseButton.css before IconButton.css. But in fact it was in the wrong order ... this led to wrongly applied CSS rules (because cascading). And yeah maybe I should move on to use CSS Modules.

Anyway her my solution - even though I can't explain why this works now:

BaseButton.js

import React from 'react';
import classnames from '../../../classnames';

export default function BaseButton({ children, type, className, ...other }) {
  return (
    <button
      className={classnames('base-button', className)}
      type={type}
      {...other}
    >
      {children}
    </button>
  );
}
BaseButton.defaultProps = {
  /** the type of the button */
  type: 'button'
};

IconButton.js

import React from 'react';

import BaseButton from '../BaseButton/BaseButton';
import classnames from '../../../classnames';

import '../../../global/Global.css';
import '../BaseButton/BaseButton.css';
import './IconButton.css';

export default function IconButton({ className, ...props }) {
  return (
    <BaseButton className={classnames('icon-button', className)} {...props} />
  );
}

Maybe one of you can explain this to me or maybe this even helps you finding a similiar solution on your projects. Just wanted to share ... and this is the first issue I found regarding CRA and mini-css-extract-plugin.

@gonzofish
Copy link

@theZieger what's in Global.css?

@theZieger
Copy link

@gonzofish some normalize styles but mostly custom properties (CSS variables)

@gonzofish
Copy link

I'm wondering if importing them over and over is causing a headache? I can't get mine to stop spitting out errors either

@theZieger
Copy link

theZieger commented Dec 14, 2018

In my case it doesn't seem to be a problem importing Global.css over and over again in multiple components.
And btw I don't get any warnings anymore after I applied the above changes I posted... But still discover smaller issues regarding the final output order.

@gonzofish
Copy link

gonzofish commented Dec 17, 2018

In my case, I had to reorder my imports, but it's not clear why:

I went from:

import AudienceComposition from '../../../shared/components/AudienceComposition/AudienceComposition';
import MetricPicker from '../../../shared/components/Bb8MetricPicker/Bb8MetricPicker';
import BulmaMessage from '../../../shared/components/BulmaMessage/BulmaMessage';
import EntityCard from '../../../shared/containers/Bb8EntityCard/Bb8EntityCard';
import EntitySearch from '../../../shared/containers/EntitySearch/EntitySearch';

to

import MetricPicker from '../../../shared/components/Bb8MetricPicker/Bb8MetricPicker';
import BulmaMessage from '../../../shared/components/BulmaMessage/BulmaMessage';
import EntityCard from '../../../shared/containers/Bb8EntityCard/Bb8EntityCard';
import EntitySearch from '../../../shared/containers/EntitySearch/EntitySearch';
import AudienceComposition from '../../../shared/components/AudienceComposition/AudienceComposition';

Even as I look at the imports of SASS files from each of those files (and anything they import), I can't figure out what was causing problems. Because a SASS file that was used by a component AudienceComposition imported was causing conflicts with all of the other SASS files from MetricPicker, BulmaMEssage, EntityCard, and EntitySearch...even when I had removed all code from the SASS file...

@stale
Copy link

stale bot commented Jan 18, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Jan 18, 2019
@rfearing
Copy link

I'm still having this issue too

@stale stale bot removed the stale label Jan 18, 2019
@ryanashcraft
Copy link

This was one of the few reasons I needed to fork react-scripts. We use CSS modules so ordering doesn't really matter for us. And there's no clear way to address the warnings as the modules in conflict are in completely separate, very-distant parts of the parsed module tree.

@pelotom
Copy link
Contributor

pelotom commented Jan 18, 2019

For users of CSS Modules it seems like ignoring the warnings (as described here) is a safe workaround.

@ryanashcraft
Copy link

@pelotom Indeed but it requires ejecting or forking.

@mAiNiNfEcTiOn
Copy link

mAiNiNfEcTiOn commented Jan 19, 2019

Well we're also using CSS Modules (with dynamic imports) and also had this issue... So we decided to downgrade.

While downgrading got rid of the warnings, it did not get rid of the consequence of having this reported issue. We basically ran into cases where based on your starting page it would determine how the styles would be affected.

We kind of solved it by adding this to webpack's config:

  optimization: {
    /* ... */
    splitChunks: {
      chunks: 'all',
      name: false,
      cacheGroups: {
        styles: {
          name: false,
          test: /\.css$/,
          chunks: 'all',
          enforce: true,
        }
      },
    },
    runtimeChunk: true, // This line is just for you to know where I added the lines above.
  },

which resulted on certain common styles being moved to one chunk.

Now, is it the right way, or a way to solve issues? Probably not.... Just putting it out as either you guys will tell me "NO DON'T DO IT" or maybe it solves your problem.

@valscion
Copy link
Contributor

Please note that my comment linked by @pelotom above does not reflect the opinions of webpack or mini-css-extract-plugin team. Don't let the "Member" highlight give me authority on that specific issue. I merely have that highlight as I'm maintaining a different webpack-contrib package, webpack-bundle-analyzer.

@feonit
Copy link

feonit commented Jan 25, 2019

I tried to find the import place that invoke the trouble (by method exception) and after I replaced some strings annoyance is out, but this behavior still looks like some weird for me

@patientplatypus
Copy link

Yeah, I'm having this. Why?

@joa
Copy link

joa commented Feb 27, 2019

It seems like there are three solutions to this issue:

  1. Eject and use custom warning filters
  2. Sort all imports in all files of your code base alphabetically
  3. Use CI=false which means you still get the warning but your pipelines won't freak out

It would be great if one could chose to suppress this warning OR if CI=true yarn build would simply have a 0-exit-code albeit the warnings -- without having to eject.

When using CSS modules one is probably not interested in any cascading overrides. At least it would go against the idea of using modules in the first place.

@ghost
Copy link

ghost commented Feb 1, 2022

Just in case, someone is still struggling with this issue, please try

plugins: [
   new MiniCssExtractPlugin({
       ignoreOrder: true
    })
]

You will not see the warnings anymore with this configuration. But I don't figure out what is the exact reason for this issue. And I got the warning after I used React.lazy to import the components dynamically.

if I close my eyes the error also goes away

@samueldaraho
Copy link

new MiniCssExtractPlugin({
ignoreOrder: true
})

@kdydo Where did you insert these lines of code?

@NicoleJaneway
Copy link

@samueldaraho in webpack.config.js

@ozkary
Copy link

ozkary commented May 25, 2022

Adding some thoughts here. I have seen this problem take place when there is a circular reference in imports. For example, FileA has imports from FileB and FileB has imports from FileA. This triggers that error downstream when those files are imported by UI components.

@puopg
Copy link

puopg commented Jun 30, 2022

Just a thought, but if we are using CSS Modules, as stated above, does it really matter about the order? Assuming things are scoped to components, no wild uses of globals, I feel like it should be totally valid to just set ignoreOrder: true.

Counter examples welcomed, but just in case im misunderstanding something, I feel like the conflicting order error is more for projects that don't have that luxury that CSS modules or other similar approaches provide.

@ozkary
Copy link

ozkary commented Jul 28, 2022

This error happens frequently when the sequence of imports is not the same in all containers/modules, so the code split finds an ambiguous pattern and raises the warning conflicts.

As a simple example, take a look at these two modules:

// Module 1

Import toolbar
Import taskbar
Import notifications

// Module 2

Import CompositeComponent  /*CONFLICT ABOUT TO SHOW*/
Import toolbar
Import taskbar

// CompositeComponent

Import notifications

If you take a look at this case, module 2 imports a new composite component at the top, which imports the notification component. This essentially brings the notification import ahead of the toolbar and taskbar, which is not what module 1 is doing.

In this case, the conflict will be with notification vs toolbar and taskbar as the warning message probably indicates. To fix this simple example, move the CompositeComponent to the end of the imports, which essentially brings the notification import to the end

// Module 2

Import toolbar
Import taskbar
Import CompositeComponent

@h-attila
Copy link

h-attila commented Sep 1, 2022

HI! I had the same problem, and eslint-plugin-import solved it. It orders the import lines in alphabetic order, so it solves the order conflict.
More info here:
https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md

@LordMendes
Copy link

In case you use the solution proposed by @myxious make sure to only override the MiniCssExtractPlugin configuration in production to avoid the following error: UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'options' of undefined

const MiniCssExtractPlugin = require('mini-css-extract-plugin');

module.exports = {
  webpack: {
    configure: (webpackConfig, { env }) => {
      if (env === 'production') {
        const instanceOfMiniCssExtractPlugin = webpackConfig.plugins.find(
          plugin => plugin instanceof MiniCssExtractPlugin
        );

        instanceOfMiniCssExtractPlugin.options.ignoreOrder = true;
      }

      return webpackConfig;
    },
  },
};

or just do something like:

if(env == 'development') return webpackConfig

@marcosdiasdev
Copy link

marcosdiasdev commented Feb 10, 2023

Remove cruft - You can clear away the timestamps and error text pretty quickly and see that there are pairs of files which have been imported in different orders at some point during the build process.
Graph.module.css
Spinner.module.css
GraphWrapper.module.css
Spinner.module.css
Spinner.module.css
GraphOptionsBar.module.css

As @rob-gordon mentioned, the point is to pay attention at the modules listed in the output message. Fortunately, in my case, there were only two modules conflicting in my project. It turned out that one of them wasn't even being used so I just removed the import and voilà!

@krutoo
Copy link

krutoo commented Mar 6, 2023

I found out by experiments that dynamic imports cause this problem in my case.

in my project there is a dependency - a component library that exports react components that import SCSS modules

in my project mini css extract plugin is configured in such a way to collect all styles in one file according to the guide

entry point of project contains several dynamic imports of moodules that has css modules imports

is it possible to somehow configure this plugin to automatically collect styles from files for each dynamic import separately?

@steveswork
Copy link

Have you tried the @webkrafters/ordercss on NPM? It may help you clear up this problem.

@scriptify
Copy link

scriptify commented Mar 9, 2023

For everyone using NX and stumbling across this problem, I solved it by setting the ignoreOrder property to true in my custom webpack config.
Sorting all imports with prettier still gave some warnings (very large codebase though).

/**
 *
 * @returns @type {import('webpack').Configuration}
 */
module.exports = composePlugins(
  withNx(),
  withReact({
    svgr: false,
  }),
  (config, { context }) => {
    const miniCssExtractPlugin = config.plugins.find(
      (plugin) => plugin.constructor.name === 'MiniCssExtractPlugin'
    );

    if (miniCssExtractPlugin) {
      miniCssExtractPlugin.options.ignoreOrder = true;
    }

    return config;
  }
);

// Functional purists may overwrite the plugins array by using `map` 😉

@krutoo
Copy link

krutoo commented Mar 10, 2023

For everyone using NX and stumbling across this problem, I solved it by setting the ignoreOrder property to true in my custom webpack config. Sorting all imports with prettier still gave some warnings (very large codebase though).

/**
 *
 * @returns @type {import('webpack').Configuration}
 */
module.exports = composePlugins(
  withNx(),
  withReact({
    svgr: false,
  }),
  (config, { context }) => {
    const miniCssExtractPlugin = config.plugins.find(
      (plugin) => plugin.constructor.name === 'MiniCssExtractPlugin'
    );

    if (miniCssExtractPlugin) {
      miniCssExtractPlugin.options.ignoreOrder = true;
    }

    return config;
  }
);

// Functional purists may overwrite the plugins array by using `map` 😉

it's not really a solution =)

#5372 (comment)

@scriptify
Copy link

For everyone using NX and stumbling across this problem, I solved it by setting the ignoreOrder property to true in my custom webpack config. Sorting all imports with prettier still gave some warnings (very large codebase though).

/**
 *
 * @returns @type {import('webpack').Configuration}
 */
module.exports = composePlugins(
  withNx(),
  withReact({
    svgr: false,
  }),
  (config, { context }) => {
    const miniCssExtractPlugin = config.plugins.find(
      (plugin) => plugin.constructor.name === 'MiniCssExtractPlugin'
    );

    if (miniCssExtractPlugin) {
      miniCssExtractPlugin.options.ignoreOrder = true;
    }

    return config;
  }
);

// Functional purists may overwrite the plugins array by using `map` 😉

it's not really a solution =)

#5372 (comment)

It depends. If you use CSS Modules without :global and/or make use of BEM for the rest of your CSS, it is a solution.
If you sort all your imports, and the error still persists, it is probably caused by a library you are using. You can now of course go to that library and open a PR, and if you're lucky it might even get merged. For the rest of us, who use CSS responsibly, this warning, if it doesn't cause any test to fail, can be ignored.

Also, have a look at this awesome write-up on SO

@nusjeff
Copy link

nusjeff commented Mar 21, 2023

In case you use the solution proposed by @myxious make sure to only override the MiniCssExtractPlugin configuration in production to avoid the following error: UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'options' of undefined

const MiniCssExtractPlugin = require('mini-css-extract-plugin');

module.exports = {
  webpack: {
    configure: (webpackConfig, { env }) => {
      if (env === 'production') {
        const instanceOfMiniCssExtractPlugin = webpackConfig.plugins.find(
          plugin => plugin instanceof MiniCssExtractPlugin
        );

        instanceOfMiniCssExtractPlugin.options.ignoreOrder = true;
      }

      return webpackConfig;
    },
  },
};

or just do something like:

if(env == 'development') return webpackConfig

I tried doing this solution and the error was solved completely!

rishichawda added a commit to rishichawda/rishikc.com that referenced this issue May 12, 2023
software issues keep getting dumber every minute facebook/create-react-app#5372 (comment)

Signed-off-by: rishichawda <rishichawda@users.noreply.github.com>
maxlath added a commit to inventaire/inventaire-client that referenced this issue May 24, 2023
Those "Conflicting order" warnings can be safely ignored in projects "where css ordering
has been mitigated through consistent use of scoping or naming conventions", which should
be our case with Svelte.

Those warnings appeared in c6b864e due to the addition of a new dependency to works_browser_section.svelte:
  import WorkActions from '#entities/components/layouts/work_actions.svelte'

Related issue: facebook/create-react-app#5372 (comment)
lubo added a commit to markavenue/website that referenced this issue Jun 14, 2023
This helps with preventing [1]. This solution is recommended in [2].

[1]: facebook/create-react-app#5372
[2]: facebook/create-react-app#5372 (comment)
lubo added a commit to markavenue/website that referenced this issue Jun 14, 2023
During the build, the following warning was appearing:

  warning chunk styles [mini-css-extract-plugin]
  Conflicting order. Following module has been added:
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/text/heading/Heading.module.css
  despite it was not able to fulfill desired ordering with these modules:
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/swiper/Swiper.module.css
  success Building production JavaScript and CSS bundles - 21.156s
     - couldn't fulfill desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/layout/Layout.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-frango-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx
     - while fulfilling desired order of chunk group(s) component---src-pages-ochrana-sukromia-tsx, component---src-pages-subory-cookies-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/frango/Common.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-frango-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/hate-free-zone/Common.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-hate-free-zone-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/soupculture/Common.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-soupculture-tsx
  warning chunk styles [mini-css-extract-plugin]
  Conflicting order. Following module has been added:
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/layout/Layout.module.css
  despite it was not able to fulfill desired ordering with these modules:
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/link-to-top/LinkToTop.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-ochrana-sukromia-tsx, component---src-pages-subory-cookies-tsx
     - while fulfilling desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-frango-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/header/Common.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-ochrana-sukromia-tsx, component---src-pages-subory-cookies-tsx
     - while fulfilling desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-frango-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/logo/Logo.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-ochrana-sukromia-tsx, component---src-pages-subory-cookies-tsx
     - while fulfilling desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-frango-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/section/Section.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-ochrana-sukromia-tsx, component---src-pages-subory-cookies-tsx
     - while fulfilling desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-frango-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/footer/Common.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-ochrana-sukromia-tsx, component---src-pages-subory-cookies-tsx
     - while fulfilling desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-frango-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx

See facebook/create-react-app#5372.
lubo added a commit to markavenue/website that referenced this issue Jun 14, 2023
During the build, the following warning was appearing:

  warning chunk styles [mini-css-extract-plugin]
  Conflicting order. Following module has been added:
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/text/heading/Heading.module.css
  despite it was not able to fulfill desired ordering with these modules:
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/swiper/Swiper.module.css
  success Building production JavaScript and CSS bundles - 21.156s
     - couldn't fulfill desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/layout/Layout.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-frango-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx
     - while fulfilling desired order of chunk group(s) component---src-pages-ochrana-sukromia-tsx, component---src-pages-subory-cookies-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/frango/Common.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-frango-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/hate-free-zone/Common.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-hate-free-zone-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/soupculture/Common.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-soupculture-tsx
  warning chunk styles [mini-css-extract-plugin]
  Conflicting order. Following module has been added:
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/layout/Layout.module.css
  despite it was not able to fulfill desired ordering with these modules:
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/link-to-top/LinkToTop.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-ochrana-sukromia-tsx, component---src-pages-subory-cookies-tsx
     - while fulfilling desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-frango-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/header/Common.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-ochrana-sukromia-tsx, component---src-pages-subory-cookies-tsx
     - while fulfilling desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-frango-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/logo/Logo.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-ochrana-sukromia-tsx, component---src-pages-subory-cookies-tsx
     - while fulfilling desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-frango-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/section/Section.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-ochrana-sukromia-tsx, component---src-pages-subory-cookies-tsx
     - while fulfilling desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-frango-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx
   * css ./node_modules/dts-css-modules-loader/index.js??ruleSet[1].rules[7].oneOf[0].use[1]!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[2]!./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[7].oneOf[0].use[3]!./src/components/ui/footer/Common.module.css
     - couldn't fulfill desired order of chunk group(s) component---src-pages-ochrana-sukromia-tsx, component---src-pages-subory-cookies-tsx
     - while fulfilling desired order of chunk group(s) component---src-pages-apartmea-tsx, component---src-pages-frango-tsx, component---src-pages-hate-free-zone-tsx, component---src-pages-quest-bar-tsx, component---src-pages-soupculture-tsx

See facebook/create-react-app#5372.
@Ankit8969
Copy link

I also got this issues, in my 5-6 files,
So, what i did
I create a global scss file and put all the css code in that file and delete the other,
this is how this issues got resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests