我试图在角7中整合对话流,我得到了这个错误。
** Angular Live Development Server is listening on localhost:4200,
open your browser on http://localhost:4200/ **
Date: 2018-11-22T13:47:11.748Z
Hash: 4075ca64830b90f82558
Time: 4597ms
chunk {main} main.js, main.js.map (main) 1.85 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 92.4 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 16.2 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 318 kB [initial] [rendered]
ERROR in node_modules/api-ai-javascript/declarations.d.ts(39,5): error TS2687: All declarations of 'stream' must have identical modifiers.
ℹ 「wdm」: Failed to compile.
发布于 2018-11-26 07:22:39
对于这一问题的临时解决方案,我在tsconfig.json文件中添加了以下检查
"compilerOptions": {
"skipLibCheck": true
}
发布于 2019-04-08 18:31:27
我想我一直在遵循相同的教程,我在这条线就在这里。中遇到了解决方案。
您正忙于导入库的部分应该具有以下路径:
import { ApiAiClient } from 'api-ai-javascript/es6/ApiAiClient'
在你的tsconfig.json里
{
"compileOnSave": false,
"compilerOptions": {
...
"baseUrl":"./",
"typeRoots": ["node_modules/@types"],
"lib": ["es2017", "dom"],
"paths":{
"api-ai-javascript/*":["node_modules/api-ai-javascript/es6/*]
}
}
}
希望这有帮助,这确实删除了编译错误,并且我能够继续。
发布于 2019-05-27 01:25:04
我也有同样的错误,只有在导入行下面更改时,它才被修复。
import {ApiAiClient} from 'api-ai-javascript/es6/ApiAiClient';
https://stackoverflow.com/questions/53432524
复制相似问题