Skip to content
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

Cannot read property 'exports' of undefinedTypeError: Cannot read property 'exports' of undefined #35214

Closed
mjbvz opened this issue Nov 19, 2019 · 5 comments
Labels
Unactionable There isn't something we can do with this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Nov 19, 2019

From microsoft/vscode#85021

TypeScript Version: 3.7.2

Search Terms:

  • TS Server
  • updateOpen
  • applyChangesInOpenFiles

Bug
A user is reporting seeing this error from the TS server during the updateOpen call:

Error: <semantic> TypeScript Server Error (3.7.2)Cannot read property 'exports' of undefinedTypeError: Cannot read property 'exports' of undefined
    at declareModuleMember (tsserver.js:29333:63)
    at delayedBindJSDocTypedefTag (tsserver.js:30680:29)
    at bindSourceFile (tsserver.js:29049:17)
    at Object.bindSourceFile (tsserver.js:28983:9)
    at initializeTypeChecker (tsserver.js:64348:20)
    at Object.createTypeChecker (tsserver.js:33602:9)
    at Object.getTypeChecker (tsserver.js:95574:79)
    at synchronizeHostData (tsserver.js:130606:21)
    at Object.getProgram (tsserver.js:130688:13)
    at InferredProject.Project.updateGraphWorker (tsserver.js:135039:53)
    at InferredProject.Project.updateGraph (tsserver.js:134982:42)
    at ProjectService.assignOrphanScriptInfoToInferredProject (tsserver.js:136778:25)
    at ProjectService.assignProjectToOpenedScriptInfo (tsserver.js:138156:26)
    at tsserver.js:138358:107
    at Object.mapDefined (tsserver.js:565:30)
    at ProjectService.applyChangesInOpenFiles (tsserver.js:138358:48)
    at Session.handlers.ts.createMapFromTemplate._a.<computed> (tsserver.js:139212:46)
    at tsserver.js:140870:88    at IOSession.Session.executeWithRequestId (tsserver.js:140861:28)
    at IOSession.Session.executeCommand (tsserver.js:140870:33)
    at IOSession.Session.onMessage (tsserver.js:140893:35)
    at Interface.<anonymous> (tsserver.js:142208:27)
    at Interface.emit (events.js:200:13)
    at Interface._onLine (readline.js:314:10)
    at Interface._normalWrite (readline.js:459:12)
    at Socket.ondata (readline.js:170:10)
    at Socket.emit (events.js:200:13)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
(at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:808:521)
@mjbvz
Copy link
Contributor Author

mjbvz commented Nov 19, 2019

@Mikrovolnovka Can you share your project or the file that seems to trigger this?

@Mikrovolnovka
Copy link

Mikrovolnovka commented Nov 20, 2019

@mjbvz tried to figure out what's causing it but still no luck.
Can't figure out the cause.
Sorry, I can't share the project as it's private and NDA.
Looks like it becomes broken when some local import is not properly made...
Not sure if it should break the TS Server itself...

@mjbvz
Copy link
Contributor Author

mjbvz commented Nov 20, 2019

Can you reduce the problem it to a minimal example?

@RyanCavanaugh RyanCavanaugh added the Unactionable There isn't something we can do with this issue label Dec 18, 2019
@RyanCavanaugh
Copy link
Member

We won't be able to make useful progress here without a repro. Please log a new issue if you're able to share a setup that can reproduce the problem. Thanks!

@RyanCavanaugh
Copy link
Member

Taking up at #36983

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unactionable There isn't something we can do with this issue
Projects
None yet
Development

No branches or pull requests

3 participants