<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: neta meta</title>
    <description>The latest articles on DEV Community by neta meta (@netameta).</description>
    <link>https://dev.to/netameta</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F663782%2F4ccaca0b-e13c-4daf-9cf1-e07a1e0a33c8.jpeg</url>
      <title>DEV Community: neta meta</title>
      <link>https://dev.to/netameta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/netameta"/>
    <language>en</language>
    <item>
      <title>Running our of memory when running `react-scripts build` on bitbucket pipline
</title>
      <dc:creator>neta meta</dc:creator>
      <pubDate>Thu, 08 Jul 2021 22:07:11 +0000</pubDate>
      <link>https://dev.to/netameta/running-our-of-memory-when-running-react-scripts-build-on-bitbucket-pipline-3mmg</link>
      <guid>https://dev.to/netameta/running-our-of-memory-when-running-react-scripts-build-on-bitbucket-pipline-3mmg</guid>
      <description>&lt;p&gt;Running our of memory when running &lt;code&gt;react-scripts build&lt;/code&gt; on bitbucket pipline even with size=2 and a 3070MBx2 memory allocated = that means a little over 6gb of memory and its still not enough to build the script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So far i've tried the following:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;added &lt;code&gt;max_old_space_size=6000&lt;/code&gt; to build script (&lt;code&gt;react-scripts --max_old_space_size=6000 build&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;adding &lt;code&gt;"resolutions": { "eslint-webpack-plugin": "2.3.0"}&lt;/code&gt; to my package.json(&lt;a href="https://github.com/facebook/create-react-app/issues/10119#issuecomment-734184155"&gt;https://github.com/facebook/create-react-app/issues/10119#issuecomment-734184155&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;added &lt;code&gt;"devDependencies": { "@babel/core": "^7.7.7",&lt;/code&gt;  to my package.json(&lt;a href="https://github.com/facebook/create-react-app/issues/8096#issuecomment-571717268"&gt;https://github.com/facebook/create-react-app/issues/8096#issuecomment-571717268&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So far the only thing that worked was either removing big packages or adding: &lt;code&gt;cross-env GENERATE_SOURCEMAP=false&lt;/code&gt; to my run script. which is not ideal because I want source maps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Logs from bitbucket&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; react-scripts --max_old_space_size=6000 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.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! xxxxxx0.1.0 build: `react-scripts --max_old_space_size=6000 build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the xxxxxx0.1.0 @0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-07-08T17_05_53_040Z-debug.log
The command '/bin/sh -c npm run build' returned a non-zero code: 1
2021-07-08T17:05:53.326849634Z stdout P 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Would love some help.&lt;/p&gt;

</description>
      <category>react</category>
    </item>
  </channel>
</rss>
