I’m working on updating a fairly old React Native app. One of the things I’ve done is remove Sentry React Native, as it required an account to access an online portal I don’t have access too. I thought this would be fairly simple – I removed Sentry from node modules, from pods, do npm install and pod install, and remove all references from Sentry out of the actual javaScript code of the app. I’ve also cleaned build, deleted node_modules and reinstalled, but have the same outcome as below.
Now, When I am trying to build iOS on xCode, I get this error
Error: Cannot find module '/Users/dev1/dev/Projectrepo/node_modules/@sentry/cli/bin/sentry-cli'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)
at Function.Module._load (internal/modules/cjs/loader.js:527:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Command PhaseScriptExecution failed with a nonzero exit code
I’ve gone through everything I can and can’t figure out why the build is still trying to include Sentry. Is it possible I haven’t removed a reference to Sentry somewhere? I know there are no more references in our JS code, but I thought I remade all other files that have to do with our dependencies so I’m stumped on this issue.