Skip to content

Reference-types directive crashes TSServer #9186

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
DanielRosenwasser opened this issue Jun 15, 2016 · 4 comments
Closed

Reference-types directive crashes TSServer #9186

DanielRosenwasser opened this issue Jun 15, 2016 · 4 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue High Priority

Comments

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Jun 15, 2016

Create a TypeScript file with the following contents:

/// <reference types="foo" />
var x;

This seems to cause TSServer to crash.

@DanielRosenwasser DanielRosenwasser added the Bug A bug in TypeScript label Jun 15, 2016
@mhegazy mhegazy added this to the TypeScript 2.0 milestone Jun 15, 2016
@RyanCavanaugh
Copy link
Member

RyanCavanaugh commented Jun 15, 2016

What exactly is the repro for this? This isn't causing any issues for me in Sublime

@DanielRosenwasser
Copy link
Member Author

So go get a clean machine.

  1. Install Sublime or VS Code.
  2. Install typescript@next globally.
  3. Point your typescript_tsdk (if Sublime) or typescript.tsdk (if VS Code) variable to your TypeScript build's lib directory.
  4. Restart your editor.
  5. Add a /// <reference types="foo" />

@zhengbli
Copy link
Contributor

FWIW now the tsserver can print exception stack trace, I do see the following stack trace for the issue:

Response received: completions (13). Request took 1 ms. Success: false . Message: Error processing request. No Project.
Error: No Project.
    at Errors (C:\Users\zhengbli\AppData\Roaming\nvm\v6.1.0\node_modules\typescript\lib\tsserver.js:49039:32)
    at ts.server.ts.server (C:\Users\zhengbli\AppData\Roaming\nvm\v6.1.0\node_modules\typescript\lib\tsserver.js:49040:11)
    at ts (C:\Users\zhengbli\AppData\Roaming\nvm\v6.1.0\node_modules\typescript\lib\tsserver.js:49986:7)
    at Object.<anonymous> (C:\Users\zhengbli\AppData\Roaming\nvm\v6.1.0\node_modules\typescript\lib\tsserver.js:49987:3)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)

@mhegazy mhegazy assigned zhengbli and unassigned RyanCavanaugh Jun 28, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Jun 28, 2016

@zhengbli can you take a look.

@zhengbli zhengbli added the Fixed A PR has been merged for this issue label Jun 28, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue High Priority
Projects
None yet
Development

No branches or pull requests

4 participants