These are chat archives for TypeStrong/atom-typescript

20th
Oct 2015
Eric Credeur
@proff321
Oct 20 2015 16:11
Hello everyone! I've been fighting with an error that claims that a file "is not included in the TypeScript compilation context." I looked over the documentation and discovered that you have to add the "files":{} property to the tsconfig.json file. I've done so via the "filesGlob":[] property and the auto-generated file list includes the file in question. I've even gone as far as to relocated the project to a path with no spaces wondering if that is the source of the issue. At this point, I've run out of options and welcome any suggestions.
Roni Frantchi
@roni-frantchi
Oct 20 2015 16:19

hi all!. quick question..
it seems like node_modules content gets compiled and spits out tons of errors when run build (F6),
that's in spite of my jsconfig.json having
"exclude": [ "node_modules/*", "examples/*" ]
have also tried "files": [ "src/app/app.ts", }
nothing sticks. still lots of:

ideas?..

Eric Credeur
@proff321
Oct 20 2015 16:20
Hello @roni-frantchi, I've been fighting with tsconfig.json issues this morning as well.
Have you tried adding !node_modules/** to the "filesGlob":[] property and then have it rebuild the file list?
Roni Frantchi
@roni-frantchi
Oct 20 2015 16:22
hi @proff321 have just seen your post. seems like you're on the other end of the spectrum - and it won't include any file for you ..?
Eric Credeur
@proff321
Oct 20 2015 16:23
Well, I tried not including any files at all and I still get the error in my case. No matter what I do, atom continues to tell me that the file in not in the compiler's context.
Roni Frantchi
@roni-frantchi
Oct 20 2015 16:31
@proff321 have you tried not specifying the files property at all? supposedly this will force it to include any and all files
Eric Credeur
@proff321
Oct 20 2015 16:31
Yep. And I just tried it again to make sure that it was something I tested.
Roni Frantchi
@roni-frantchi
Oct 20 2015 16:32
@proff321 at the risk of sounding like your system admin.. did you try to close and reopen atom? i think i read somewhere that you should or it won't detect this sort of changes.. anyway it did not help for me but maybe you're in luck
@proff321 !node_modules/** didn't help either btw
@proff321 it actually generated the files to include all that's under node_modules/** funny the ! didn't catch on
Eric Credeur
@proff321
Oct 20 2015 16:34
LOL, well at least my filesGlob:[] is following the ignores.
Hmmm, do you have your base code folder placed in a DropBox (or something similar) directory?
Eric Credeur
@proff321
Oct 20 2015 16:42
Well, it looks like my issue could be related to some type of bug.
Roni Frantchi
@roni-frantchi
Oct 20 2015 16:42
@proff321 nope. no spaces orr odd characters either.
Eric Credeur
@proff321
Oct 20 2015 16:43
I just figured out that if you click on the error it will open a ton of tabs that all link to the same file.
Roni Frantchi
@roni-frantchi
Oct 20 2015 16:43
@proff321 how so? what'd you find?
Eric Credeur
@proff321
Oct 20 2015 16:43
If you click on the file in one of the tabs that just opened, the error goes away.
Roni Frantchi
@roni-frantchi
Oct 20 2015 16:43
@proff321 ouch.
Eric Credeur
@proff321
Oct 20 2015 16:43
Well, it looks like I'm filing a bug.
One more thought for you @roni-frantchi have you tried removing all of the files:{} and excludes:{} and re-generating them from the filesGlob:[] property?
If you try this, make sure that you do no leave a trailing comma after the "fileGlobs":[] property, otherwise it will not generate the "files":{} property.
Roni Frantchi
@roni-frantchi
Oct 20 2015 16:54
@proff321 thanks. still no luck. i also tried "filesGlob": [ "src/**" ] but it just seem to cause the build progress to start and just hang in there.. so weird
Basarat Ali Syed
@basarat
Oct 20 2015 19:55

@proff321

Tips : files and exclude (note not excludes ... and I did argue for it ... https://github.com/Microsoft/TypeScript/pull/3188#issuecomment-102720217 but they went with exclude ¯\_(ツ)_/¯) are both arrays ... so files:{} is bad files:[] is good (same for exclude). Also `exclude should just be directory name (
"exclude": [ "node_modules", "examples" ])

PS: feel free to file a :bug: :rose: