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

Stuck on Creating an optimized production build... #653

Open
gegham-khachatryan opened this issue Oct 30, 2023 · 3 comments
Open

Stuck on Creating an optimized production build... #653

gegham-khachatryan opened this issue Oct 30, 2023 · 3 comments

Comments

@gegham-khachatryan
Copy link

gegham-khachatryan commented Oct 30, 2023

When running the project using react-app-rewired start, everything functions correctly. However, during the build process, it becomes stuck at the 'Creating an optimized production build...' message. This issue persists even when creating a new Create React App (CRA) project.

/* config-overrides.js */

const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");

module.exports = function override(config, env) {
  config.plugins.push(new MonacoWebpackPlugin());
  return config;
};

Version of "react-app-rewired": "^2.2.1"
Version of "react-scripts": "^5.0.1"

@DewangS
Copy link

DewangS commented Feb 8, 2024

in my case it throws below error and build stops ... need urgent help

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

@camillalo
Copy link

camillalo commented Feb 8, 2024 via email

@DewangS
Copy link

DewangS commented Feb 14, 2024

ok, found a solution just in case someone else is having similar issue like mine.. I had to tweak the build command in my package.json as per below.... overall I am unhappy with React 18 and webpack 5 as it literally broke many things which used to work fine in React 16.

"build": "react-scripts --openssl-legacy-provider build"

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

No branches or pull requests

3 participants