react-app-rewired icon indicating copy to clipboard operation
react-app-rewired copied to clipboard

Build Failed using react-app-rewired

Open Leyksnal opened this issue 2 years ago • 3 comments

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').

Leyksnal avatar Feb 22 '23 02:02 Leyksnal

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 avatar Sep 01 '23 16:09 medram

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/*"],
-            "@/*": ["./*"]
        }
    }
}

medram avatar Sep 01 '23 18:09 medram

@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.

  • configuration.resolve has an unknown property 'fallback'. These properties are valid: object { alias?, aliasFields?, cachePredicate?, cacheWithContext?, concord?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSystem?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, symlinks?, unsafeCache?, useSyncFileSystemCalls? } -> Options for the resolver

DewangS avatar Feb 08 '24 00:02 DewangS