dialogflow-javascript-client icon indicating copy to clipboard operation
dialogflow-javascript-client copied to clipboard

TSLint issue

Open Jbz797 opened this issue 7 years ago • 1 comments

When i build with Angular CLI, i have this error :

ERROR in node_modules/api-ai-javascript/ts/Request/TTSRequest.ts(17,31): error TS2339: Property 'DEFAULT_TTS_HOST' does not exist on type 'typeof ApiAiConstants'.

To unlock the problem i need to add : export const DEFAULT_TTS_HOST = '' in the file : node_modules/api-ai-javascript/ts/ApiAiConstants.ts

Jbz797 avatar May 24 '18 09:05 Jbz797

I'm not even sure this code that's causing the compilation failure is even used. For anyone else experiencing this issue, I was able to get around the compilation errors by excluding the file from compilation. Update your tsconfig.json file with the following.

I'm using Angular 6, so you may need to alter this based on your configuration.

{
  "exclude": [
    "./../node_modules/api-ai-javascript/ts/Request/TTSRequest.ts"
  ],
  "include": [
    "./../node_modules/api-ai-javascript/ts/**/*",
    "./../node_modules/api-ai-javascript/index.ts"
  ]
}

c4ndybar avatar Aug 17 '18 16:08 c4ndybar