Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 从Github存储库导入角度组件-找不到模块或其相应的类型声明_Angular_Github_Npm_Angular Components_Angular Module - Fatal编程技术网

Angular 从Github存储库导入角度组件-找不到模块或其相应的类型声明

Angular 从Github存储库导入角度组件-找不到模块或其相应的类型声明,angular,github,npm,angular-components,angular-module,Angular,Github,Npm,Angular Components,Angular Module,我想将一个角度组件从GitHub上的一个项目/模块导入另一个项目/模块。这里是到测试模块的链接:带有测试组件。我在本地创建了另一个Angular项目并运行 npm install --save https://github.com/tilo-ai/test-mod test mod已添加到package.json中: "dependencies": { "test-mod": "git+https://github.com/tilo-ai/

我想将一个角度组件从GitHub上的一个项目/模块导入另一个项目/模块。这里是到测试模块的链接:带有测试组件。我在本地创建了另一个Angular项目并运行

npm install --save https://github.com/tilo-ai/test-mod
test mod已添加到package.json中:

"dependencies": {
  "test-mod": "git+https://github.com/tilo-ai/test-mod.git",
},
我尝试使用导入app.module.ts中的TestCompComponent

import { TestCompComponent } from 'test-mod';
但我得到了一个错误:

Cannot find module 'test-mod' or its corresponding type declarations.

有人知道缺少什么吗?

如果编辑器中出现错误,请尝试此解决方案。

我认为发生错误是因为我仍然缺少一般的东西。例如,我没有类型文件。我刚刚用ng new my project创建了一个角度项目。