-
-
Notifications
You must be signed in to change notification settings - Fork 27k
mini-css-extract-plugin throws "Conflicting order" errors during build #5372
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
Comments
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. |
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. |
@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). |
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. |
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. |
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? |
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. |
@theZieger what's in |
@gonzofish some normalize styles but mostly custom properties (CSS variables) |
I'm wondering if importing them over and over is causing a headache? I can't get mine to stop spitting out errors either |
In my case it doesn't seem to be a problem importing Global.css over and over again in multiple components. |
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 |
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. |
I'm still having this issue too |
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. |
For users of CSS Modules it seems like ignoring the warnings (as described here) is a safe workaround. |
@pelotom Indeed but it requires ejecting or forking. |
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. |
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, |
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 |
Yeah, I'm having this. Why? |
It seems like there are three solutions to this issue:
It would be great if one could chose to suppress this warning OR if 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. |
@samueldaraho in |
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. |
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 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. |
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:
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
|
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. |
or just do something like: if(env == 'development') return webpackConfig |
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à! |
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? |
Have you tried the @webkrafters/ordercss on NPM? It may help you clear up this problem. |
For everyone using NX and stumbling across this problem, I solved it by setting the /**
*
* @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 =) |
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. |
I tried doing this solution and the error was solved completely! |
software issues keep getting dumber every minute facebook/create-react-app#5372 (comment) Signed-off-by: rishichawda <[email protected]>
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)
This helps with preventing [1]. This solution is recommended in [2]. [1]: facebook/create-react-app#5372 [2]: facebook/create-react-app#5372 (comment)
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.
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.
I also got this issues, in my 5-6 files, |
Here's my understand and solution to the issue. It's not very straightforward because it requires you to understand how the imports appear in the code, in the entire import tree. What's causing them?Context:
If a build entry imports What do they cause?If the styles actually overlapped each other, the style imported later (in the source code) wouldn't be applied because it still appeared earlier in the output CSS file. FixEnsure that the order is always the same. Example: Conflicting order. Following module has been added:
* css /node_modules/react-image-crop/src/ReactCrop.scss
despite it was not able to fulfill desired ordering with these modules:
* css /node_modules/@fortawesome/fontawesome-svg-core/styles.css
- couldn't fulfill desired order of chunk group(s) isolated/EphemeralFormContent
- while fulfilling desired order of chunk group(s) isolated/CustomFormComponent You have to figure out which packages lead to
|
(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.
The text was updated successfully, but these errors were encountered: