Skip to content

Tsserver crashes on Android (Termux) #12260

@andraaspar

Description

@andraaspar

TypeScript Version: 2.0.9

Code

Running tsserver from Termux terminal app on Android:

$ tsserver

Expected behavior:
Tsserver to run.

Actual behavior:

/data/data/com.termux/files/usr/lib/node_modules/typescript/lib/tsserver.js:1317
                throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
                ^

Error: Debug Failure. False expression:
    at Object.assert (/data/data/com.termux/files/usr/lib/node_modules/typescript/lib/tsserver.js:1317:23)
at getGlobalTypingsCacheLocation (/data/data/com.termux/files/usr/lib/node_modules/typescript/lib/tsserver.js:56199:22)
    at ts.server.ts.server (/data/data/com.termux/files/usr/lib/node_modules/typescript/lib/tsserver.js:56563:160)
    at ts (/data/data/com.termux/files/usr/lib/node_modules/typescript/lib/tsserver.js:56569:7)
    at Object.<anonymous> (/data/data/com.termux/files/usr/lib/node_modules/typescript/lib/tsserver.js:56570:3)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

Workaround:

Edit tsserver.js:

case "linux":
case "android": // add this line
    basePath = os.homedir();
    break;

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: TSServerIssues related to the TSServerFixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions