AppModule的NgModule.imports中位置X处的值不是引用.无法静态确定值



我正试图在一个简单的项目中使用有角度的电话号码,

这是我试图效仿的例子:

第二个例子:https://edupala.com/how-to-add-angular-phone-number-format/

我在终端中运行以下代码:

npm i ngx-mat-intl-tel-input --save
npm install libphonenumber-js --save

但是,当我尝试将NgxMatIntlTelInputModule添加到app.module文件中的imports数组时,会出现以下错误:

Value at position 6 in the NgModule.imports of AppModule is not a reference
Value could not be determined statically.

我用的是角14。

有什么帮助吗?

我遇到了一个类似的问题,可以通过在";X〃;索引通过:

npm uninstall module-name-at-index-X

您可以通过查看app.module.ts中的@NgModule imports数组来确定该归咎于哪个模块(如果您有适当的语法高亮显示,它将是数组中唯一不同颜色的模块(。

npm install module-name-at-index-X

手动删除整个node_modules文件夹,然后通过常规npm安装重新安装时,它不起作用,但当我只对有故障的模块采取行动时,它解决了问题。

最新更新