dialogflow / dialogflow-javascript-client

JavaScript Web SDK for Dialogflow
Apache License 2.0
412 stars 173 forks source link

TSLint issue #88

Open Jbz797 opened 6 years ago

Jbz797 commented 6 years ago

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 : _nodemodules/api-ai-javascript/ts/ApiAiConstants.ts

c4ndybar commented 6 years ago

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"
  ]
}