I have been diligently working on an Ionic app for the past three months with no major issues during development or deployment to mobile devices. However, yesterday I encountered a frustrating NPM dependency problem while trying to deploy to mobile. In an attempt to fix this issue, I decided to delete the node_modules folder and run 'npm install'.
Unfortunately, since then I have been unable to successfully build my app for both mobile and browser testing due to TypeScript throwing an error that reads, 'Error: Failed to transpile program.' The root of this issue seems to be centered around '@types/pouchdb-core', specifically with the TypeScript error 'Cannot find namespace 'Core'.'
While attempting to debug, the chain of errors leads me to 'Supplied parameters do not match any signature of call target' in my code. Strangely, this line of code was functioning properly just yesterday before I reinstalled the packages and encountered these errors.
Despite scouring the internet for solutions, setting package versions back to a known stable configuration, and ensuring all packages are up to date (including '@types/pouchdb-core' at version '6.1.5'), I am still unable to resolve this perplexing issue. It seems like something went wrong after updating the packages, even though I didn't make any changes to the packages file manually.
If anyone has any insights or possible solutions, I would greatly appreciate it. Here is a detailed gist of the errors from the command line logs during 'ionic serve':
https://gist.github.com/leetheguy/9e10a27ffc2f853f2b03c5a9fad10710