Angular @types/bootstrap error: Namespace 'popper.js' has no exported member

那年仲夏 提交于 2021-01-29 10:44:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!