question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in 'realPath' during 'getApplicableRefactors'

See original GitHub issue

This issue comes from crash dumps in telemetry. We’ve tried to de-duplicate issues on a best-effort basis, comparing the sequence of methods called and the command requested while ignoring line numbers. TypeScript version prefix: 4.4.4 VSCode version: 1.61.2 Command requested: getApplicableRefactors Hitting sessions: 152 Five line hash: f80b0e0a8ef4225e432cc9880580c8ff Stack:

    at unknown (suppressed.ts)
    at realPath (tsserver.js:41684:18)
    at tryResolve (tsserver.js:41661:32)
    at <anonymous> (tsserver.js:41644:69)
    at forEach (tsserver.js:194:30)
    at nodeModuleNameResolverWorker (tsserver.js:41644:25)
    at nodeModuleNameResolver (tsserver.js:41636:16)
    at resolveModuleName (tsserver.js:41405:30)
    at resolveModuleName (tsserver.js:116084:36)
    at resolveNamesWithLocalCache (tsserver.js:116159:38)
    at resolveModuleNames (tsserver.js:116233:20)
    at Project.resolveModuleNames (tsserver.js:161176:45)
    at unknown (tsserver.js:111517:133)
    at resolveModuleNamesWorker (tsserver.js:111783:26)
    at resolveModuleNamesReusingOldState (tsserver.js:111958:19)
    at processImportedModules (tsserver.js:113338:35)
    at findSourceFileWorker (tsserver.js:113139:17)
    at findSourceFile (tsserver.js:113000:26)
    at processImportedModules (tsserver.js:113374:25)
    at findSourceFileWorker (tsserver.js:113139:17)
    at findSourceFile (tsserver.js:113000:26)
    at processImportedModules (tsserver.js:113374:25)
    at findSourceFileWorker (tsserver.js:113139:17)
    at findSourceFile (tsserver.js:113000:26)
    at <anonymous> (tsserver.js:112952:85)
    at getSourceFileFromReferenceWorker (tsserver.js:112919:34)
    at processSourceFile (tsserver.js:112952:13)
    at processRootFile (tsserver.js:112759:13)
    at <anonymous> (tsserver.js:111624:67)
    at forEach (tsserver.js:194:30)
    at createProgram (tsserver.js:111624:16)
    at synchronizeHostData (tsserver.js:156605:26)
    at getProgram (tsserver.js:156737:13)
    at Project.updateGraphWorker (tsserver.js:161733:53)
    at Project.updateGraph (tsserver.js:161662:42)
    at ConfiguredProject.updateGraph (tsserver.js:162644:63)
    at updateProjectIfDirty (tsserver.js:163133:45)
    at Project.getLanguageService (tsserver.js:161280:28)
    at Session.getApplicableRefactors (tsserver.js:168512:32)
    at _a.<computed> (tsserver.js:167223:61)
    at <anonymous> (tsserver.js:168880:88)
    at Session.executeWithRequestId (tsserver.js:168871:28)
    at Session.executeCommand (tsserver.js:168880:33)
    at Session.onMessage (tsserver.js:168906:35)
    at <anonymous> (tsserver.js:171511:31)
    at unknown (suppressed.js:315:20)
    at unknown (suppressed.js:337:10)
    at unknown (suppressed.js:482:12)
    at unknown (suppressed.js:194:10)
    at unknown (suppressed.js:315:20)
    at unknown (suppressed.js:309:12)
    at unknown (suppressed.js:284:9)
    at unknown (suppressed.js:223:10)
    at unknown (suppressed.js:188:23)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewbranchcommented, Nov 3, 2021

The frame Project.resolveModuleNames makes it pretty unlikely this is a custom host—the Project should be the module resolution host in this case.

0reactions
typescript-botcommented, Jul 18, 2022

This issue reproduced in the following context: TypeScript version prefix: 4.7.4 VSCode version: 1.69.1 Command requested: updateOpen Hitting sessions: 108 Five line hash: f80b0e0a8ef4225e432cc9880580c8ff Stack:

    at unknown (suppressed.ts)
    at realPath (tsserver.js:43239:18)
    at tryResolve (tsserver.js:43204:32)
    at <anonymous> (tsserver.js:43178:69)
    at forEach (tsserver.js:183:30)
    at nodeModuleNameResolverWorker (tsserver.js:43178:25)
    at nodeModuleNameResolver (tsserver.js:43153:16)
    at resolveModuleName (tsserver.js:42880:30)
    at resolveModuleName (tsserver.js:121159:36)
    at resolveNamesWithLocalCache (tsserver.js:121244:38)
    at resolveModuleNames (tsserver.js:121322:20)
    at Project.resolveModuleNames (tsserver.js:169105:45)
    at unknown (tsserver.js:116462:153)
    at resolveModuleNamesWorker (tsserver.js:116765:26)
    at resolveModuleNamesReusingOldState (tsserver.js:116943:19)
    at processImportedModules (tsserver.js:118373:35)
    at findSourceFileWorker (tsserver.js:118153:17)
    at findSourceFile (tsserver.js:118002:26)
    at <anonymous> (tsserver.js:117954:85)
    at getSourceFileFromReferenceWorker (tsserver.js:117920:34)
    at processSourceFile (tsserver.js:117954:13)
    at processRootFile (tsserver.js:117755:13)
    at <anonymous> (tsserver.js:116571:67)
    at forEach (tsserver.js:183:30)
    at createProgram (tsserver.js:116571:16)
    at synchronizeHostData (tsserver.js:164475:26)
    at getProgram (tsserver.js:164607:13)
    at Project.updateGraphWorker (tsserver.js:169675:53)
    at Project.updateGraph (tsserver.js:169603:42)
    at ConfiguredProject.updateGraph (tsserver.js:170717:63)
    at updateProjectIfDirty (tsserver.js:171206:45)
    at ProjectService.assignProjectToOpenedScriptInfo (tsserver.js:173536:29)
    at <anonymous> (tsserver.js:173871:97)
    at flatMap (tsserver.js:508:25)
    at ProjectService.applyChangesInOpenFiles (tsserver.js:173871:41)
    at _a.<computed> (tsserver.js:175006:46)
    at <anonymous> (tsserver.js:177195:88)
    at Session.executeWithRequestId (tsserver.js:177186:28)
    at Session.executeCommand (tsserver.js:177195:33)
    at Session.onMessage (tsserver.js:177221:35)
    at <anonymous> (tsserver.js:179856:31)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does realpath() return error EEXIST? - c++ - Stack Overflow
However, sometimes realpath() will fail with error code 17, name EEXIST , string description "File exists". That baffles me. Of course it exists ......
Read more >
realpath(3) - Linux manual page - man7.org
EIO An I/O error occurred while reading from the filesystem. ELOOP Too many symbolic links were encountered in translating the pathname. ENAMETOOLONG A ......
Read more >
realpath - Manual - PHP
Here is a small and handy method to calculate the relative path from $from to $to. Note: On Windows it does not work...
Read more >
realpath
The file_name argument is a null pointer. [EIO]: An error occurred while reading from the file system. [ELOOP]: A loop exists in symbolic...
Read more >
flutter-tester device not shutting down properly - IssueHint
Screenshot 2022-12-20 at 2 43 31 PM ... Screenshot 2022-12-21 at 11 39 44 AM ... Error in 'realPath' during 'getApplicableRefactors' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found