title: React app won't start on "npm start" command - "process out of memory" error
body: <p>I have a React app that I'm trying to start via running <code>npm start</code>. This app currently is part of a Firebase project and using Firebase Cloud Functions as its backend, but previously was using a node server as the backend. When I was using the node server, I had no problems start the app and developing locally by running <code>npm run dev</code> in the node app and <code>npm start</code> in the React app. Somewhere along the way of transitioning from a node app to a Firebase app I am no longer able to start my React app locally, which I want to do to be able to develop locally. Here's the error I get in my console when I try running the command:</p>
  <pre><code>
  [28951:0x158008000]     4427 ms: Scavenge 66.2 (95.0) -&gt; 56.5 (95.0) MB, 15.8 / 0.0 ms  (average mu = 0.997, current mu = 0.997) allocation failure 
  
  
  &lt;--- JS stacktrace ---&gt;
  
  FATAL ERROR: wasm code commit Allocation failed - process out of memory
   1: 0x1007ff344 node::Abort() [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
   2: 0x1007ff4c4 node::errors::TryCatchScope::~TryCatchScope() [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
   3: 0x10091eb98 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
   4: 0x10091eb2c v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
   5: 0x100e572dc v8::internal::wasm::WasmCodeAllocator::AllocateForCodeInRegion(v8::internal::wasm::NativeModule*, unsigned long, v8::base::AddressRegion) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
   6: 0x100e581b8 v8::internal::wasm::NativeModule::CreateEmptyJumpTableInRegion(unsigned int, v8::base::AddressRegion) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
   7: 0x100e57680 v8::internal::wasm::NativeModule::AddCodeSpace(v8::base::AddressRegion) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
   8: 0x100e57ff4 v8::internal::wasm::NativeModule::NativeModule(v8::internal::wasm::WasmEngine*, v8::internal::wasm::WasmFeatures const&amp;, bool, v8::internal::VirtualMemory, std::__1::shared_ptr&lt;v8::internal::wasm::WasmModule const&gt;, std::__1::shared_ptr&lt;v8::internal::Counters&gt;, std::__1::shared_ptr&lt;v8::internal::wasm::NativeModule&gt;*) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
   9: 0x100e5a234 v8::internal::wasm::WasmCodeManager::NewNativeModule(v8::internal::wasm::WasmEngine*, v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&amp;, unsigned long, bool, std::__1::shared_ptr&lt;v8::internal::wasm::WasmModule const&gt;) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  10: 0x100e60b3c v8::internal::wasm::WasmEngine::NewNativeModule(v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&amp;, unsigned long, bool, std::__1::shared_ptr&lt;v8::internal::wasm::WasmModule const&gt;) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  11: 0x100e60a84 v8::internal::wasm::WasmEngine::NewNativeModule(v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&amp;, std::__1::shared_ptr&lt;v8::internal::wasm::WasmModule const&gt;) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  12: 0x100e39464 v8::internal::wasm::AsyncCompileJob::CreateNativeModule(std::__1::shared_ptr&lt;v8::internal::wasm::WasmModule const&gt;) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  13: 0x100e42178 v8::internal::wasm::AsyncCompileJob::PrepareAndStartCompile::RunInForeground(v8::internal::wasm::AsyncCompileJob*) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  14: 0x100e42a08 v8::internal::wasm::AsyncCompileJob::CompileTask::RunInternal() [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  15: 0x10085efa4 node::PerIsolatePlatformData::RunForegroundTask(std::__1::unique_ptr&lt;v8::Task, std::__1::default_delete&lt;v8::Task&gt; &gt;) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  16: 0x10085dfbc node::PerIsolatePlatformData::FlushForegroundTasksInternal() [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  17: 0x100fb3ac8 uv__async_io [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  18: 0x100fc5688 uv__io_poll [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  19: 0x100fb3f58 uv_run [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  20: 0x10083a8b4 node::NodeMainInstance::Run() [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  21: 0x1007d9604 node::Start(int, char**) [/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node]
  22: 0x182718f54 start [/usr/lib/system/libdyld.dylib]
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! personal-site@0.1.0 start: `react-scripts start`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the personal-site@0.1.0 start 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!     /Users/salinawu/.npm/_logs/2021-01-19T07_02_03_221Z-debug.log
  </code></pre>
  <p>And here's the contents of the log file:</p>
  <pre><code>1 verbose cli [
  1 verbose cli   '/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node',
  1 verbose cli   '/Users/salinawu/.nvm/versions/node/v12.20.1/bin/npm',
  1 verbose cli   'start'
  1 verbose cli ]
  2 info using npm@6.14.11
  3 info using node@v12.20.1
  4 verbose run-script [ 'prestart', 'start', 'poststart' ]
  5 info lifecycle personal-site-backend@0.1.0~prestart: personal-site-backend@0.1.0
  6 info lifecycle personal-site-backend@0.1.0~start: personal-site-backend@0.1.0
  7 verbose lifecycle personal-site-backend@0.1.0~start: unsafe-perm in lifecycle true
  8 verbose lifecycle personal-site-backend@0.1.0~start: PATH: /Users/salinawu/.nvm/versions/node/v12.20.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/salinawu/projects/website/app/node_modules/.bin:/Users/salinawu/Downloads/google-cloud-sdk/bin:/Users/salinawu/.nvm/versions/node/v12.20.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  9 verbose lifecycle personal-site-backend@0.1.0~start: CWD: /Users/salinawu/projects/website/app
  10 silly lifecycle personal-site-backend@0.1.0~start: Args: [ '-c', 'react-scripts start' ]
  11 silly lifecycle personal-site-backend@0.1.0~start: Returned: code: 1  signal: null
  12 info lifecycle personal-site-backend@0.1.0~start: Failed to exec start script
  13 verbose stack Error: personal-site-backend@0.1.0 start: `react-scripts start`
  13 verbose stack Exit status 1
  13 verbose stack     at EventEmitter.&lt;anonymous&gt; (/Users/salinawu/.nvm/versions/node/v12.20.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
  13 verbose stack     at EventEmitter.emit (events.js:314:20)
  13 verbose stack     at ChildProcess.&lt;anonymous&gt; (/Users/salinawu/.nvm/versions/node/v12.20.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
  13 verbose stack     at ChildProcess.emit (events.js:314:20)
  13 verbose stack     at maybeClose (internal/child_process.js:1022:16)
  13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
  14 verbose pkgid personal-site-backend@0.1.0
  15 verbose cwd /Users/salinawu/projects/website/app
  16 verbose Darwin 20.1.0
  17 verbose argv &quot;/Users/salinawu/.nvm/versions/node/v12.20.1/bin/node&quot; &quot;/Users/salinawu/.nvm/versions/node/v12.20.1/bin/npm&quot; &quot;start&quot;
  18 verbose node v12.20.1
  19 verbose npm  v6.14.11
  20 error code ELIFECYCLE
  21 error errno 1
  22 error personal-site-backend@0.1.0 start: `react-scripts start`
  22 error Exit status 1
  23 error Failed at the personal-site-backend@0.1.0 start script.
  23 error This is probably not a problem with npm. There is likely additional logging output above.
  24 verbose exit [ 1, true ]
  </code></pre>
  <p>I'm really unsure of how to approach this and why it's happening. I've tried deleting my node modules and cache and running <code>npm install</code>, but I get the same thing. Thanks in advance!</p>