Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Cannot find module 'source-map-support'

Out of nowhere, my working react native app gave me this error when I opened it today. I tried npm install , yarn and cleaning the cache but nothing helped. As I said, it came out out of nowhere as everything used to work fine before that. What could be the reason for this and how can I solve it?

    > expo start

internal/modules/cjs/loader.js:968
  throw err;
  ^

Error: Cannot find module 'source-map-support'
Require stack:
- C:\Users\Angel\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\build\index.js
- C:\Users\Angel\AppData\Roaming\npm\node_modules\expo-cli\build\exp.js
- C:\Users\Angel\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\Users\Angel\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\build\index.js:4:30)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\Angel\\AppData\\Roaming\\npm\\node_modules\\expo-cli\\node_modules\\xdl\\build\\index.js',
    'C:\\Users\\Angel\\AppData\\Roaming\\npm\\node_modules\\expo-cli\\build\\exp.js',
    'C:\\Users\\Angel\\AppData\\Roaming\\npm\\node_modules\\expo-cli\\bin\\expo.js'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ 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\Angel\AppData\Roaming\npm-cache\_logs\2021-06-06T18_17_52_900Z-debug.log
like image 396
Fiphe Avatar asked Sep 04 '26 23:09

Fiphe


1 Answers

After lots of hours of struggle at the end I just deleted Expo and then installed it again and it worked.

like image 164
Fiphe Avatar answered Sep 06 '26 17:09

Fiphe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!