Skip to content

workerLib.js is throwing error, file is not emitted #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Ciantic opened this issue Apr 24, 2015 · 2 comments
Closed

workerLib.js is throwing error, file is not emitted #304

Ciantic opened this issue Apr 24, 2015 · 2 comments
Assignees

Comments

@Ciantic
Copy link

Ciantic commented Apr 24, 2015

I tried to install atom-typescript from package manager, with apm, and finally downloading a zip. I think it's not corrupted.

I get this in the developer console:

TypeError: undefined is not a function
    at getDeclarationDiagnosticsForFile (evalmachine.<anonymous>:224:27)
    at getDiagnosticsHelper (evalmachine.<anonymous>:192:24)
    at Object.getDeclarationDiagnostics (evalmachine.<anonymous>:207:20)
    at Object.getSemanticDiagnostics (evalmachine.<anonymous>:1504:50)
    at getDiagnositcsByFilePath (...\atom-typescript\dist\main\lang\projectService.js:210:47)
    at errorsForFile (...\atom-typescript\dist\main\lang\projectService.js:216:30)
    at Object.errorsForFileFiltered (...\atom-typescript\dist\main\lang\projectService.js:70:12)
    at Child.RequesterResponder.processRequest (...\atom-typescript\dist\worker\lib\workerLib.js:34:60)
    at process.<anonymous> (...\atom-typescript\dist\worker\lib\workerLib.js:194:23)
    at emitTwo (events.js:87:13)

When I try to save my index.ts file in atom. Here is the file and repository that causes this: https://github.com/Ciantic/model-validation/blob/master/index.ts it is not happening with all ts files.

Problem began after I had updated to 4.0.4

Oh, and running tsc works normally.

Edit Closer inspection I see bunch of these slightly different, they all begin from emitTwo or process.emit

Edit I think something is calling EventEmitter.prototype.emit with wrong arguments, the arguments[2] is undefined when this error happens, and is passed to emitTwo. The gist of the problem maybe that [1,2,undefined].length === 3 and not 2. Though not sure what this events.js is.

@basarat
Copy link
Member

basarat commented Apr 25, 2015

Just thought I'd share some information:

Though not sure what this events.js is.

Its the one that comes with iojs : https://github.com/iojs/io.js/blob/master/lib/events.js Its a part of the runtime 🌹

@basarat basarat self-assigned this Apr 25, 2015
@basarat basarat added the bug label Apr 25, 2015
@basarat
Copy link
Member

basarat commented Apr 25, 2015

Fixed with v4.0.7. Thanks for reporting 🌹

@TypeStrong TypeStrong locked and limited conversation to collaborators Jan 20, 2019
angelestelar5z added a commit to angelestelar5z/atom-typescript that referenced this issue Aug 17, 2024
…cript#304

the tsconfig.json file used by the TypeScript team has these files missing. Send a PR.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants