Cannot find module 'source-map-support"

I tried running “expo diagnostics” and I’m getting this error. Originally, I had same error with expo build:web.

Anyone know why?

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

Error: Cannot find module ‘source-map-support’
Require stack:

  • C:\Users\Archi Bald\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\build\index.js
  • C:\Users\Archi Bald\AppData\Roaming\npm\node_modules\expo-cli\build\exp.js
  • C:\Users\Archi Bald\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js
    ←[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)←[39m
    ←[90m at Function.Module._load (internal/modules/cjs/loader.js:725:27)←[39m
    ←[90m at Module.require (internal/modules/cjs/loader.js:952:19)←[39m
    ←[90m at require (internal/modules/cjs/helpers.js:88:18)←[39m
    at Object. (C:\Users\Archi Bald\AppData\Roaming\npm\node_modules\←[4mexpo-cli←[24m\node_modules\←[4mxdl←[24m\build\index.js:3:30)
    ←[90m at Module._compile (internal/modules/cjs/loader.js:1063:30)←[39m
    ←[90m at Object.Module._extensions…js (internal/modules/cjs/loader.js:1092:10)←[39m
    ←[90m at Module.load (internal/modules/cjs/loader.js:928:32)←[39m
    ←[90m at Function.Module._load (internal/modules/cjs/loader.js:769:14)←[39m
    ←[90m at Module.require (internal/modules/cjs/loader.js:952:19)←[39m {
    code: ←[32m’MODULE_NOT_FOUND’←[39m,
    requireStack: [
    ←[32m’C:\Users\Archi Bald\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\build\index.js’←[39m,
    ←[32m’C:\Users\Archi Bald\AppData\Roaming\npm\node_modules\expo-cli\build\exp.js’←[39m,
    ←[32m’C:\Users\Archi Bald\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js’←[39m
    ]
    }

Try running npm install or yarn depending on which one you’re using to manage your dependencies.

If that doesn’t help, try removing node_modules and repeat the npm install or yarn.

If that still doesn’t work, maybe try removing package-lock.json/yarn.lock and repeat the above.

1 Like