title: React Native start failed with error code -4094 how to solve this ONCE for ALL?
body: <p>I'm trying to run <code>react-native start</code> (as all the other days, it works normally) and it gives me this error:</p>
  
  <p><strong>THE ERROR</strong></p>
  
  <pre><code>Loading dependency graph...events.js:287
        throw er; // Unhandled 'error' event
        ^
  
  Error: UNKNOWN: unknown error, lstat 'C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2\node_modules\jest-util\node_modules\.bin\mkdirp'
  Emitted 'error' event on NodeWatcher instance at:
      at NodeWatcher.checkedEmitError (C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2\node_modules\sane\src\node_watcher.js:143:12)
      at Walker.emit (events.js:310:20)
      at C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2\node_modules\walker\lib\walker.js:52:12
      at FSReqCallback.oncomplete (fs.js:167:21) {
    errno: -4094,
    code: 'UNKNOWN',
    syscall: 'lstat',
    path: 'C:\\Users\\OKR\\Desktop\\MeetUp App\\Development\\MeetUp2\\node_modules\\jest-util\\node_modules\\.bin\\mkdirp'
  }
  </code></pre>
  
  <p><strong>ERROR LOG</strong></p>
  
  <pre><code>0 info it worked if it ends with ok
  1 verbose cli [
  1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
  1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
  1 verbose cli   'run',
  1 verbose cli   'start'
  1 verbose cli ]
  2 info using npm@6.14.4
  3 info using node@v12.16.3
  4 verbose run-script [ 'prestart', 'start', 'poststart' ]
  5 info lifecycle MeetUp2@0.0.1~prestart: MeetUp2@0.0.1
  6 info lifecycle MeetUp2@0.0.1~start: MeetUp2@0.0.1
  7 verbose lifecycle MeetUp2@0.0.1~start: unsafe-perm in lifecycle true
  8 verbose lifecycle MeetUp2@0.0.1~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2\node_modules\.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools;C:\Program Files\Java\jdk1.8.0_152\bin;C:\Program Files\nodejs\;C:\Users\OKR\AppData\Local\Microsoft\WindowsApps;C:\Users\OKR\AppData\Local\atom\bin;C:\Users\OKR\AppData\Local\Programs\Microsoft VS Code\bin;c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools;C:\MinGW\bin;D:\Genymotion\tools;C:\Users\OKR\AppData\Roaming\npm
  9 verbose lifecycle MeetUp2@0.0.1~start: CWD: C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2
  10 silly lifecycle MeetUp2@0.0.1~start: Args: [ '/d /s /c', 'react-native start' ]
  11 silly lifecycle MeetUp2@0.0.1~start: Returned: code: 1  signal: null
  12 info lifecycle MeetUp2@0.0.1~start: Failed to exec start script
  13 verbose stack Error: MeetUp2@0.0.1 start: `react-native start`
  13 verbose stack Exit status 1
  13 verbose stack     at EventEmitter.&lt;anonymous&gt; (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
  13 verbose stack     at EventEmitter.emit (events.js:310:20)
  13 verbose stack     at ChildProcess.&lt;anonymous&gt; (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
  13 verbose stack     at ChildProcess.emit (events.js:310:20)
  13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
  13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
  14 verbose pkgid MeetUp2@0.0.1
  15 verbose cwd C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2
  16 verbose Windows_NT 10.0.17763
  17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start"
  18 verbose node v12.16.3
  19 verbose npm  v6.14.4
  20 error code ELIFECYCLE
  21 error errno 1
  22 error MeetUp2@0.0.1 start: `react-native start`
  22 error Exit status 1
  23 error Failed at the MeetUp2@0.0.1 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><strong>WHAT I'VE TRIED</strong></p>
  
  <ul>
  <li><p>Deleted <code>node_modules</code> packages and <code>package-lock.json</code> and run <code>npm install</code>. It still fails after many trials</p></li>
  <li><p>Update <code>node.js</code> to the latest-recommended version: <code>12.16.3</code>. Then repeat the above step and it still fails</p></li>
  <li><p>Run <code>npm cache clean</code> ( gives error) and reapeat step 1 --> Fail</p></li>
  <li><p><strong>EDIT 1</strong> I have tried <code>react-native start --reset-cache</code> and it gives the same error</p></li>
  <li><p><strong>EDIT 2</strong> I've tried: <code>npm cache clean --force</code> and it gives me error:</p></li>
  </ul>
  
  <pre><code>npm ERR! code UNKNOWN
  npm ERR! syscall unlink
  npm ERR! path C:\Users\OKR\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\30\b7\d403a3bea9ab8b0dbca6fa631982d5c21917c8c72428787e88295705b25c8e0c47bf12524dc2bd05a21437c46e02e872ba6e4dca60f3d7c0754993757935
  npm ERR! errno -4094
  npm ERR! UNKNOWN: unknown error, unlink 'C:\Users\OKR\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\30\b7\d403a3bea9ab8b0dbca6fa631982d5c21917c8c72428787e88295705b25c8e0c47bf12524dc2bd05a21437c46e02e872ba6e4dca60f3d7c0754993757935'
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\OKR\AppData\Roaming\npm-cache\_logs\2020-05-26T13_16_06_204Z-debug.log
  </code></pre>
  
  <p><em>The logs</em></p>
  
  <blockquote>
    <p>0 info it worked if it ends with ok
    1 verbose cli [
    1 verbose cli   'C:\Program Files\nodejs\node.exe',
    1 verbose cli   'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
    1 verbose cli   'cache',
    1 verbose cli   'clean',
    1 verbose cli   '--force'
    1 verbose cli ]
    2 info using npm@6.14.4
    3 info using node@v12.16.3
    4 warn using --force I sure hope you know what you are doing.
    5 verbose npm-session ec09bc51399022bd
    6 verbose stack Error: UNKNOWN: unknown error, unlink 'C:\Users\OKR\AppData\Roaming\npm-cache_cacache\content-v2\sha512\30\b7\d403a3bea9ab8b0dbca6fa631982d5c21917c8c72428787e88295705b25c8e0c47bf12524dc2bd05a21437c46e02e872ba6e4dca60f3d7c0754993757935'
    7 verbose cwd C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2
    8 verbose Windows_NT 10.0.17763
    9 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "cache" "clean" "--force"
    10 verbose node v12.16.3
    11 verbose npm  v6.14.4
    12 error code UNKNOWN
    13 error syscall unlink
    14 error path C:\Users\OKR\AppData\Roaming\npm-cache_cacache\content-v2\sha512\30\b7\d403a3bea9ab8b0dbca6fa631982d5c21917c8c72428787e88295705b25c8e0c47bf12524dc2bd05a21437c46e02e872ba6e4dca60f3d7c0754993757935
    15 error errno -4094
    16 error UNKNOWN: unknown error, unlink 'C:\Users\OKR\AppData\Roaming\npm-cache_cacache\content-v2\sha512\30\b7\d403a3bea9ab8b0dbca6fa631982d5c21917c8c72428787e88295705b25c8e0c47bf12524dc2bd05a21437c46e02e872ba6e4dca60f3d7c0754993757935'
    17 verbose exit [ -4094, true ]</p>
  </blockquote>
  
  <p>(<em>I can't put the above log in code format since Stack Overflow doesn't allow to</em>)</p>
  
  <ul>
  <li><strong>EDIT 3:</strong> I've tried  to run <code>cmd</code> in administrator mode but it throws the same error </li>
  <li><strong>EDIT 4:</strong> I've tried <code>npm start</code> and it gives me this error:</li>
  </ul>
  
  <pre><code>Loading dependency graph...events.js:287
        throw er; // Unhandled 'error' event
        ^
  
  Error: UNKNOWN: unknown error, lstat 'C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\jest-util\node_modules\.bin\mkdirp'
  Emitted 'error' event on NodeWatcher instance at:
      at NodeWatcher.checkedEmitError (C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\sane\src\node_watcher.js:143:12)
      at Walker.emit (events.js:310:20)
      at C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\walker\lib\walker.js:52:12
      at FSReqCallback.oncomplete (fs.js:167:21) {
    errno: -4094,
    code: 'UNKNOWN',
    syscall: 'lstat',
    path: 'C:\\Users\\OKR\\Desktop\\MeetUp_App\\Development\\MeetUp2\\node_modules\\jest-util\\node_modules\\.bin\\mkdirp'
  }
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! MeetUp2@0.0.1 start: `react-native start`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the MeetUp2@0.0.1 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!     C:\Users\OKR\AppData\Roaming\npm-cache\_logs\2020-05-27T11_29_28_113Z-debug.log
  </code></pre>
  
  <p><strong>The logs:</strong></p>
  
  <pre><code>0 info it worked if it ends with ok
  1 verbose cli [
  1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
  1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
  1 verbose cli   'start'
  1 verbose cli ]
  2 info using npm@6.14.5
  3 info using node@v12.16.3
  4 verbose run-script [ 'prestart', 'start', 'poststart' ]
  5 info lifecycle MeetUp2@0.0.1~prestart: MeetUp2@0.0.1
  6 info lifecycle MeetUp2@0.0.1~start: MeetUp2@0.0.1
  7 verbose lifecycle MeetUp2@0.0.1~start: unsafe-perm in lifecycle true
  8 verbose lifecycle MeetUp2@0.0.1~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools;C:\Program Files\Java\jdk1.8.0_152\bin;C:\Program Files\nodejs\;C:\Users\OKR\AppData\Local\Microsoft\WindowsApps;C:\Users\OKR\AppData\Local\atom\bin;C:\Users\OKR\AppData\Local\Programs\Microsoft VS Code\bin;c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools;C:\MinGW\bin;D:\Genymotion\tools;C:\Users\OKR\AppData\Roaming\npm
  9 verbose lifecycle MeetUp2@0.0.1~start: CWD: C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2
  10 silly lifecycle MeetUp2@0.0.1~start: Args: [ '/d /s /c', 'react-native start' ]
  11 silly lifecycle MeetUp2@0.0.1~start: Returned: code: 1  signal: null
  12 info lifecycle MeetUp2@0.0.1~start: Failed to exec start script
  13 verbose stack Error: MeetUp2@0.0.1 start: `react-native start`
  13 verbose stack Exit status 1
  13 verbose stack     at EventEmitter.&lt;anonymous&gt; (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
  13 verbose stack     at EventEmitter.emit (events.js:310:20)
  13 verbose stack     at ChildProcess.&lt;anonymous&gt; (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
  13 verbose stack     at ChildProcess.emit (events.js:310:20)
  13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
  13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
  14 verbose pkgid MeetUp2@0.0.1
  15 verbose cwd C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2
  16 verbose Windows_NT 10.0.17763
  17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
  18 verbose node v12.16.3
  19 verbose npm  v6.14.5
  20 error code ELIFECYCLE
  21 error errno 1
  22 error MeetUp2@0.0.1 start: `react-native start`
  22 error Exit status 1
  23 error Failed at the MeetUp2@0.0.1 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>
  
  <ul>
  <li><strong>EDIT 5:</strong> I've tried to run the command to upgrade react-native using <code>npx react-native upgrade</code>. And it gives this error:</li>
  </ul>
  
  <pre><code>info No version passed. Fetching latest...
  info Fetching diff between v0.61.5 and v0.62.2...
  info Applying diff...
  warn Excluding files that exist in the template, but not in your project:
  
  error Automatically applying diff failed. We did our best to automatically upgrade as many files as possible
  warn Continuing after failure. Some of the files are upgraded but you will need to deal with conflicts manually
  info Installing "react-native@0.62.2" and its peer dependencies...
  error Command failed: npm install --save --save-exact react-native@0.62.2 react@16.11.0
  npm ERR! Cannot read property 'match' of undefined
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\OKR\AppData\Roaming\npm-cache\_logs\2020-05-27T11_26_44_748Z-debug.log
  . Run CLI with --verbose flag for more details.
  Error: Command failed: npm install --save --save-exact react-native@0.62.2 react@16.11.0
  npm ERR! Cannot read property 'match' of undefined
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\OKR\AppData\Roaming\npm-cache\_logs\2020-05-27T11_26_44_748Z-debug.log
  
      at makeError (C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\execa\index.js:174:9)
      at C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\execa\index.js:278:16
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
      at async installDeps (C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\react-native\node_modules\@react-native-community\cli\build\commands\upgrade\upgrade.js:206:3)
      at async Object.upgrade [as func] (C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\react-native\node_modules\@react-native-community\cli\build\commands\upgrade\upgrade.js:345:9)
      at async Command.handleAction (C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:182:9)
  </code></pre>
  
  <p><strong>My</strong> <strong><em>package.json</em></strong></p>
  
  <pre><code>{
    "name": "MeetUp2",
    "version": "0.0.1",
    "private": true,
    "scripts": {
      "android": "react-native run-android",
      "ios": "react-native run-ios",
      "start": "react-native start",
      "test": "jest",
      "lint": "eslint ."
    },
    "dependencies": {
      "@eva-design/eva": "^1.4.0",
      "@mapbox/polyline": "^1.1.0",
  
      "@react-native-community/cameraroll": "^1.6.1",
      "@react-native-community/datetimepicker": "^2.3.2",
      "@react-native-community/google-signin": "^4.0.1",
      "@react-native-community/masked-view": "^0.1.10",
      "@react-native-firebase/admob": "^6.7.1",
      "@react-native-firebase/app": "^6.7.1",
      "@react-native-firebase/auth": "^6.7.1",
      "@react-native-firebase/firestore": "^6.7.1",
      "@react-native-firebase/storage": "^6.7.1",
      "@react-navigation/drawer": "^5.7.1",
      "@react-navigation/native": "^5.2.6",
      "@react-navigation/stack": "^5.3.1",
  
      "@ui-kitten/components": "^4.4.1",
      "axios": "^0.19.2",
      "lodash": "^4.17.15",
      "moment": "^2.25.3",
      "react": "16.9.0",
      "react-native": "0.61.5",
      "react-native-collapsingtoolbar": "^1.0.3",
  
      "react-native-device-info": "^5.5.7",
  
      "react-native-fbsdk": "^1.1.2",
      "react-native-geolocation-service": "^4.0.1",
      "react-native-gesture-handler": "^1.6.1",
  
      "react-native-get-random-values": "^1.4.0",
      "react-native-image-picker": "^2.3.1",
      "react-native-keychain": "^6.0.0",
  
      "react-native-maps": "^0.27.1",
      "react-native-modal-datetime-picker": "^8.6.0",
      "react-native-paper": "^3.10.1",
      "react-native-reanimated": "^1.8.0",
      "react-native-redash": "^14.0.4",
      "react-native-safe-area-context": "^0.7.3",
      "react-native-screens": "^2.7.0",
      "react-native-share": "^3.3.2",
      "react-native-svg": "^12.1.0",
      "react-native-tab-view": "^2.14.0",
      "react-native-vector-icons": "^6.6.0",
      "react-native-view-shot": "^3.1.2",
      "react-navigation-header-buttons": "^3.0.5",
      "react-redux": "^7.2.0",
      "redux": "^4.0.5",
  
      "redux-persist": "^6.0.0",
      "redux-thunk": "^2.3.0",
      "rn-fetch-blob": "^0.12.0",
      "uuid": "^8.0.0"
    },
    "devDependencies": {
      "@babel/core": "^7.9.6",
      "@babel/runtime": "^7.9.6",
      "@react-native-community/eslint-config": "^0.0.7",
      "babel-jest": "^25.5.1",
      "eslint": "^6.8.0",
      "jest": "^25.5.4",
      "jetifier": "^1.6.5",
      "metro-react-native-babel-preset": "^0.59.0",
      "react-test-renderer": "16.9.0"
    },
    "jest": {
      "preset": "react-native"
    }
  }
  </code></pre>
  
  <p><strong>PLEASE HELP ME</strong></p>