I am trying to integrate Dialogflow in Angular 7. I am getting this error.
** 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.
I think i have been following the same tutorial and i came across the solution in this thread right here.
The section where you are busy importing the library should have this path
import { ApiAiClient } from 'api-ai-javascript/es6/ApiAiClient'
in your tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
...
"baseUrl":"./",
"typeRoots": ["node_modules/@types"],
"lib": ["es2017", "dom"],
"paths":{
"api-ai-javascript/*":["node_modules/api-ai-javascript/es6/*]
}
}
}
Hope this helps, this did remove the compiling error and i was able to continue.
source
I had the same error and only with below changing in import line, it fixed.
import {ApiAiClient} from 'api-ai-javascript/es6/ApiAiClient';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With