timarney / react-app-rewired

Override create-react-app webpack configs without ejecting
MIT License
9.76k stars 425 forks source link

Build Failed using react-app-rewired #644

Open Leyksnal opened 1 year ago

Leyksnal commented 1 year ago

Error building with react-app-rewired

react-app-rewired build

Creating an optimized production build...
Failed to compile.

Attempted import error: 'LowPriority' is not exported from 'scheduler' (imported as 'LowPriority').
medram commented 10 months ago

Having the same issue, it's react-app-rewired that caused the issue, I still don't know how to fix it,

Does anyone have an idea to fix this?

medram commented 10 months ago

Finally, I've fixed it, in my case the issue is caused by an alias, I've removed it, and everything worked as intended:

{
    "compilerOptions": {
        "paths": {
            "@components/*": ["./src/components/*"],
            "@assets/*": ["./src/assets/*"],
            "@api/*": ["./src/api/*"],
            "@hooks/*": ["./src/hooks/*"],
            "@pages/*": ["./src/pages/*"],
            "@utils/*": ["./src/utils/*"],
-            "@/*": ["./*"]
        }
    }
}
DewangS commented 5 months ago

@medram ... in my case I am getting below error .. have no idea what's wrong with the webpack config

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.