Skip to content

TypeError: Cannot read property '239' of undefined #18712

Closed
@ccorcos

Description

@ccorcos

TypeScript Version: 2.5.2 / nightly (2.5.0-dev.201xxxxx)

Code

I'm upgrading my 2.3 project to 2.5 and I'm getting this really cryptic error:

❯❯❯ ./node_modules/.bin/tsc --noEmit
/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:56136
                throw e;
                ^

TypeError: Cannot read property '239' of undefined
    at getDeclarationSpaces (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:33091:52)
    at checkExportsOnMergedDeclarations (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:33037:41)
    at checkInterfaceDeclaration (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:34730:17)
    at checkSourceElement (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:35469:28)
    at Object.forEach (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:275:30)
    at checkSourceFileWorker (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:35536:20)
    at checkSourceFile (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:35521:13)
    at getDiagnosticsWorker (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:35574:17)
    at Object.getDiagnostics (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:35563:24)
    at /Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:56151:85
    at runWithCancellationToken (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:56129:24)
    at getSemanticDiagnosticsForFileNoCache (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:56143:20)
    at getAndCacheDiagnostics (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:56351:26)
    at getSemanticDiagnosticsForFile (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:56140:20)
    at /Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:56097:24
    at Object.flatMap (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:507:25)
    at getDiagnosticsHelper (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:56093:56)
    at Object.getSemanticDiagnostics (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:56104:20)
    at compileProgram (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:59094:43)
    at compile (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:59051:26)
    at performCompilation (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:58940:33)
    at Object.executeCommandLine (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:58883:9)
    at Object.<anonymous> (/Users/chet/Code/notion-next/node_modules/typescript/lib/tsc.js:59241:4)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/chet/Code/notion-next/node_modules/typescript/bin/tsc:2:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:427:7)
    at startup (bootstrap_node.js:151:9)
    at bootstrap_node.js:542:3

Expected behavior:

I would expect an error that tells me something about how I can fix this...

Actual behavior:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions