问题
I've done a fair amount of searching and have been unable to come up with any guidance on an error - the one article I found seems to indicate that it may just be a version compatibility issue, but I am unsure of whether that's actually the case.
I have used npm install @types/bootstrap
, along with its dependencies @popper.js
and @jquery
. When I run ng serve
, I get this error:
ERROR in node_modules/@types/bootstrap/index.d.ts(35,29): error TS2694: Namespace ''popper.js'' has no exported member 'Offset'.
Anyone have any insight into getting past this?
回答1:
I ended up getting around this and compiling by going into the node_moduls/@types/bootstrap/index.d.ts
file and replacing every errored 'popper.js' type with any
and could at least compile and continue using the functionality without issue.
来源:https://stackoverflow.com/questions/52124273/angular-types-bootstrap-error-namespace-popper-js-has-no-exported-member