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

Stuck on Creating an optimized production build...

Open gegham-khachatryan opened this issue 1 year ago • 3 comments

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"

gegham-khachatryan avatar Oct 30 '23 12:10 gegham-khachatryan

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

DewangS avatar Feb 08 '24 00:02 DewangS

这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

camillalo avatar Feb 08 '24 00:02 camillalo

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"

DewangS avatar Feb 14 '24 22:02 DewangS