After updating my Angular version from 7.X to 8.2.5, everything seemed fine until I started getting errors related to the rxjs
module within the angular/core
package. Despite having the latest version of rxjs
(6.5.3), the errors persisted even after removing rxjs-compat
. Here's a snippet of the error message:
ERROR in ../../../../../node_modules/@angular/core/src/application_ref.d.ts:8:28 - error TS2307: Cannot find module 'rxjs'.
8 import { Observable } from 'rxjs';
~~~~~~
...
I tried re-installing npm packages and checking my dependencies listed in package.json
, but the issue remained unresolved. However, my application continued to function despite these errors cropping up during compilation.
If you're facing a similar problem, make sure to double-check your project's directory structure for any unexpected node_modules
directories that might be causing conflicts. In my case, I found one such rogue directory outside of my project's main folder which was triggering these errors.
Once I removed this rogue node_modules
directory, the errors disappeared, and my application compiled without any issues. So if you're struggling with the same error message post-update, it might be worth investigating any stray node modules cluttering your file system!