JS Outdated / TS Emit failed
Every time I save a .ts file (even if there are no errors) atom will give me a little red pop-up flag indicating TS Emit failed. This is just one of the mildly infuriating things that I could totally live with, but would really love to disable. Any tips?
Thanks!
I'm on OSX 10.11.4 if that matters ¯_(ツ)_/¯
pix or it didn't happen

I found a work around where I add
atom-notification.error {
display: none;
}
to the Stylesheet, but I don't like to have to do that :/
Since moving to Typescript 2.0 I've been seeing this as well. It still seems to update the file. If anyone wants to chime in with how to figure out what it's failing on I would be happy to debug.
Same problem here. And disable "compileOnSave" is not a valid option for me. =/
Hi, same issue on Ubuntu 16.04
Latest Atom, Typescript and Node.

I have got the same issue. Mytsconfig.json looks like
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"noImplicitAny": false,
"sourceMap": false,
"outDir": "./dist",
"noEmitOnError": true
},
"files":[
"src/main.ts"
]
}
When I remove the option noEmitOnError or set it to false, everything works fine. Building (F6) the project with this setting on true says: "Build success", but doesn't do anything.
Same issue, happens on save.
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"isolatedModules": false,
"jsx": "react",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"declaration": false,
"noImplicitAny": false,
"noImplicitUseStrict": false,
"removeComments": true,
"noLib": false,
"preserveConstEnums": true,
"suppressImplicitAnyIndexErrors": true,
"declaration": true,
"rootDir": "./src",
"outDir": "./lib",
"declarationDir": "./lib"
},
"exclude": [
"node_modules",
"typings/browser",
"typings/browser.d.ts"
],
"compileOnSave": true,
"buildOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
Error is the exact same as anyone else.
I must add that the TypeScript compiler works normally with the tsc command.
I have the same problem, but only when using declaration: true in tscconfig.json.
And not always...sometime when I first open the project everything seems to work fine, then I do some changes (modify tscconfig.json, open generated file, ...) and bang! JS Outdated and TS emit error...
As already reported tsc compilation works just fine.
Here my project where you can reproduce the issue (I hope ) : https://github.com/davideicardi/progress-logger-js/tree/5eafe4d76aa5177360ac7e75a83360c484618b3e
having the same problem. Can bypass issue by setting "noEmitOnError": false but would rather not. Saving files seems to make Atom think there was an error (when there actually was not) and thus .ts file is not emitted. Can compile on command line with tsc just fine.
Maybe I have found a solution, at least for my use case.
Basically I have the following tsconfig:
{
"compilerOptions": {
....
"declaration": true,
"outDir": "build"
},
"exclude": [
"node_modules"
],
"compileOnSave": true
}
Note that I have an outDir set to build but I have not added the build directory to the excluded array. So probably atom-typescript try to build also *.d.ts files in the build directory.
Adding build in the exclude array solve my problems and I don't see any error (no JS Outdated / TS Emit failed).
{
"compilerOptions": {
....
"declaration": true,
"outDir": "build"
},
"exclude": [
"build",
"node_modules"
],
"compileOnSave": true
}
I suggest to also exclude *.d.ts files if you don't use an out directory.
Same issue. But if I exclude the node_modules folder as suggested by @davideicardi above, then any types I have installed from npm, such as npm install @types/node are also ignored.
According to the typescript handbook:
The
"exclude"property defaults to excluding thenode_modules,bower_components,jspm_packagesand<outDir>directories when not specified.
Is atom-typescript simply not respecting these defaults?
This issue has been marked as stale because it did not have any activity for the last 90 days or more. Remove the stale label or comment or this will be closed in 14 days