Angular 组件UserSettingsModalComponent的模板中出错

Angular 组件UserSettingsModalComponent的模板中出错,angular,npm,Angular,Npm,我只是将粘贴的角度项目文件夹复制到我的系统中 当我运行NPMServe时,我很少看到这样的错误 src/app/pages/service-request-oddc/command-selection/command-modal/command-modal.component.html:179:142 - error NG8004: No pipe found with name 'i18n'. 179 *ngIf="!(oddcsha

我只是将粘贴的角度项目文件夹复制到我的系统中

当我运行NPMServe时,我很少看到这样的错误

    src/app/pages/service-request-oddc/command-selection/command-modal/command-modal.component.html:179:142 - error NG8004: No pipe found with name 'i18n'.

179                     *ngIf="!(oddcshareddata.commandParamsIdx < (oddcshareddata.selectValues.selectedCmdWithParams.length - 1))" [innerText]="'_DoneButton_'| i18n"></button>
                                                                                                                                                                 ~~~~

  src/app/pages/service-request-oddc/command-selection/command-modal/command-modal.component.ts:13:16
    13   templateUrl: './command-modal.component.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component CommandModalComponent.
src/app/components/user-settings-modal/user-settings-modal.component.html:113:27 - error NG8004: No pipe found with name 'i18n'.

113                     [innerText]="'_OK_' | i18n"></button>
                                              ~~~~

  src/app/components/user-settings-modal/user-settings-modal.component.ts:14:15
    14  templateUrl: './user-settings-modal.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component UserSettingsModalComponent.
src/app/pages/service request oddc/command selection/command modal/command modal.component.html:179:142-错误NG8004:未找到名为“i18n”的管道。
179*ngIf=“!(oddcshareddata.commandParamsIdx<(oddcshareddata.selectValues.selectedCmdWithParams.length-1))“[innerText]=”“(u DoneButton|i18n”>
~~~~
src/app/pages/service request oddc/command selection/command modal/command modal.component.ts:13:16
13 templateUrl:'./命令modal.component.html',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
组件命令ModalComponent的模板中出错。
src/app/components/user settings modal/user settings modal.component.html:113:27-错误NG8004:未找到名为“i18n”的管道。
113[innerText]=“好的”
~~~~
src/app/components/user settings model/user settings model.component.ts:14:15
14 templateUrl:“./user settings modal.component.html”,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
组件UserSettingsModalComponent的模板中出错。

您能告诉我哪里出了问题,如何修复吗???

您没有导入所有必需的模块。检查从哪个模块导出i18n管道,并将其作为导入添加到父模块中。我假设它是angular i18n模块。在我的同事开发的系统中,它工作正常,我只是在我的系统中复制粘贴的项目文件夹,我收到了这些错误。您是否通过运行
npm install
安装了节点模块?可能您错过了一些软件包。我在执行npm安装时遇到错误,所以我所做的是安装nodejs并复制整个项目文件夹,包括node_模块,现在运行服务器时遇到此错误。