小编Fel*_*ann的帖子

使用 ClarityIcons 时无法在“CustomElementRegistry”上执行“define”

在我的应用程序中,我想ClarityIcons.add()用来添加自定义图标。但是我收到以下错误:

index.js:402 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry
    at Object../src/clr-icons/index.ts (http://localhost:4200/vendor.js:84958:20)
    at __webpack_require__ (http://localhost:4200/vendor.js:84586:30)
    at ./src/clr-icons/clr-icons-api.ts.Object.defineProperty.value (http://localhost:4200/vendor.js:84635:18)
    at http://localhost:4200/vendor.js:84638:10
    at webpackUniversalModuleDefinition (http://localhost:4200/vendor.js:84564:20)
    at Object../node_modules/@clr/icons/index.js (http://localhost:4200/vendor.js:84566:3)
    at __webpack_require__ (http://localhost:4200/runtime.js:84:30)
    at Module../src/app/core/components/core/core.component.ts (http://localhost:4200/main.js:1528:68)
    at __webpack_require__ (http://localhost:4200/runtime.js:84:30)
    at Module../src/app/app.module.ts (http://localhost:4200/main.js:618:94)
Run Code Online (Sandbox Code Playgroud)

我尝试在 stackblitz 中复制它,但它运行良好。在其他问题中,我阅读了有关删除package-lock.json然后重新安装节点模块的内容。我试过这个,但我仍然有相同的结果。知道错误可能在哪里吗?

clarity angularjs typescript vmware-clarity

1
推荐指数
1
解决办法
1505
查看次数

标签 统计

angularjs ×1

clarity ×1

typescript ×1

vmware-clarity ×1