'How to work around an error in a node_module (aws-amplify)?
I am using the auth stuff from aws-amplify (4.3.14 which is the latest), and I am getting this error
Cannot user namespace 'Observable' as a type.
I have tried npm i, npm ci, deleting all my packages and restarting everything. It seems that the issue is the way the module imports the Observable type into the modules- it is importing them as a default important(Observable), instead of module import({Observable}). If I go in and change the import everything works fine, however that won't work because once ci runs, it will get the modules from npm. I have also tried the solutions here: https://github.com/aws-amplify/amplify-js/issues/9204 but they haven't worked.
I have also tried
npm i @types/zen-observable
What do I do?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|



