Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

include multiple node_modules in tsconfig.json

I am using Migrating Angular 4.x to Angular 5 my project. I have faced

ERROR in ./node_modules/api-ai-javascript/index.ts 

So i changed in tsconfig.json added below changes,

"include": [
    "src/**/*",
    "node_modules/api-ai-javascript/index.ts"
  ]

Still getting /node_modules/ng2-stomp-service/dist/stomp.service.ts How to added include multiple node_modules?

EDITED:

 "include": [
    "src/**/*",
    {"node_modules/api-ai-javascript/index.ts"},
    {"node_modules/ng2-stomp-service/dist/stomp.service.ts"},
  ]

Getting expected token } in JSON at position 439.

like image 650
Vikram R Avatar asked Oct 28 '22 21:10

Vikram R


1 Answers

Regarding the invalid json, it's because "include" must be an array of strings. Try that

"include": [
    "src/**/*",
    "node_modules/api-ai-javascript/index.ts",
    "node_modules/ng2-stomp-service/dist/stomp.service.ts"
]
like image 75
David Avatar answered Nov 12 '22 16:11

David