не удалось выполнить производственную сборку react-app-rewired. Это, вероятно, означает, что в системе закончилась память

#javascript #reactjs #circleci #production #react-app-rewired

#язык JavaScript #реагирует на #circleci #производство #реагировать-приложение-перемонтировано

Вопрос:

 "scripts": {  "start": "PORT=4001 react-app-rewired start",  "build": "export NODE_OPTIONS='--openssl-legacy-provider'; react-app-rewired --max_old_space_size=8096 build",  "test": "react-app-rewired --env=jsdom"  },  

Я использую react-app-rewired для создания своего приложения react. Ниже приведен мой config-overrides.js

 const path = require('path'); const {override, addLessLoader} = require('customize-cra')  const overrideProcessEnv = value =gt; config =gt; {  config.resolve.modules = [  path.join(__dirname, 'src')  ].concat(config.resolve.modules);  return config; };  module.exports = override(  addLessLoader({  javascriptEnabled: true,  }),  overrideProcessEnv({  VERSION: JSON.stringify(require('./package.json').version),  }) );  

Хотя я создаю локальную систему, она работает, но не работает на сервере prod. node версия самая последняя. Бревна:-

 yarn install v1.22.15 info No lockfile found. [1/4] Resolving packages... warning react-scripts gt; babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates. warning react-scripts gt; webpack-dev-server gt; chokidar@2.1.8: Chokidar 2 will break on node v14 . Upgrade to chokidar 3 with 15x less dependencies. warning react-scripts gt; webpack-dev-server gt; chokidar gt; fsevents@1.2.13: fsevents 1 will break on node v14  and could be using insecure binaries. Upgrade to fsevents 2. warning react-scripts gt; @pmmmwh/react-refresh-webpack-plugin gt; native-url gt; querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. warning react-scripts gt; webpack-dev-server gt; url gt; querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. warning react-scripts gt; @svgr/webpack gt; @svgr/plugin-svgo gt; svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. warning react-scripts gt; resolve-url-loader gt; rework gt; css gt; source-map-resolve gt; resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated warning react-scripts gt; resolve-url-loader gt; rework gt; css gt; urix@0.1.0: Please see https://github.com/lydell/urix#deprecated warning react-scripts gt; resolve-url-loader gt; rework gt; css gt; source-map-resolve gt; urix@0.1.0: Please see https://github.com/lydell/urix#deprecated warning react-scripts gt; webpack-dev-server gt; webpack-log gt; uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. warning react-scripts gt; workbox-webpack-plugin gt; workbox-build gt; @hapi/joi@15.1.1: Switch to 'npm install joi' warning react-scripts gt; workbox-webpack-plugin gt; workbox-build gt; rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel. warning react-scripts gt; webpack gt; watchpack gt; watchpack-chokidar2 gt; chokidar@2.1.8: Chokidar 2 will break on node v14 . Upgrade to chokidar 3 with 15x less dependencies. warning react-scripts gt; babel-jest gt; @jest/transform gt; jest-haste-map gt; sane@4.1.0: some dependency vulnerabilities fixed, support for node lt; 10 dropped, and newer ECMAScript syntax/features added warning react-scripts gt; optimize-css-assets-webpack-plugin gt; cssnano gt; cssnano-preset-default gt; postcss-svgo gt; svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. warning react-scripts gt; postcss-preset-env gt; postcss-color-gray gt; postcss-values-parser gt; flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash. warning react-scripts gt; workbox-webpack-plugin gt; workbox-build gt; @hapi/joi gt; @hapi/address@2.1.4: Moved to 'npm install @sideway/address' warning react-scripts gt; workbox-webpack-plugin gt; workbox-build gt; @hapi/joi gt; @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained warning react-scripts gt; workbox-webpack-plugin gt; workbox-build gt; @hapi/joi gt; @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained warning react-scripts gt; workbox-webpack-plugin gt; workbox-build gt; @hapi/joi gt; @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained warning react-scripts gt; workbox-webpack-plugin gt; workbox-build gt; @hapi/joi gt; @hapi/topo gt; @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained warning react-scripts gt; workbox-webpack-plugin gt; workbox-build gt; strip-comments gt; babel-plugin-transform-object-rest-spread gt; babel-runtime gt; core-js@2.6.12: core-js@lt;3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. [2/4] Fetching packages... info fsevents@2.3.2: The platform "linux" is incompatible with this module. info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.13: The platform "linux" is incompatible with this module. info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning " gt; @testing-library/user-event@12.8.3" has unmet peer dependency "@testing-library/dom@gt;=7.21.4". warning " gt; less-loader@5.0.0" has incorrect peer dependency "less@^2.3.1 || ^3.0.0". warning " gt; less-loader@5.0.0" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0". warning " gt; react-custom-scrollbars@4.2.1" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0". warning " gt; react-custom-scrollbars@4.2.1" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0". warning "react-scripts gt; @typescript-eslint/eslint-plugin gt; tsutils@3.21.0" has unmet peer dependency "typescript@gt;=2.8.0 || gt;= 3.2.0-dev || gt;= 3.3.0-dev || gt;= 3.4.0-dev || gt;= 3.5.0-dev || gt;= 3.6.0-dev || gt;= 3.6.0-beta || gt;= 3.7.0-dev || gt;= 3.7.0-beta". [4/4] Building fresh packages... success Saved lockfile. Done in 40.24s.  gt; platform_ui@2.0.0 build gt; export NODE_OPTIONS='--openssl-legacy-provider'; react-app-rewired --max_old_space_size=8096 build  Creating an optimized production build... The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.  Exited with code exit status 1