All declarations of 'stream' must have identical modifiers api-ai-javascript - Dialogflow

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';

For temporary solution to this, I have added the following check in your tsconfig.json file

  "compilerOptions": {
    "skipLibCheck": true
  }