After upgrading angular and @types/angular version to version 1.6.x I have lots of TS2694 errors:
error TS2694: Namespace 'angular' has no exported member 'material'
error TS2694: Namespace 'angular' has no exported member 'ui'
error TS2694: Namespace 'angular' has no exported member 'translate'
This worked fine before changing the version number.
What could cause the issue?
Manually editing the file like in the accepted answer above caused some issues for me.
Running "yarn upgrade" or altering some packages would revert the manually edited change and my app would be broken again.
To fix this I added a resolution to package.json which fixes the issue of resolving different versions.
"resolutions": {
"**/@types/angular": "1.6.20"
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With