-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Debug Failure. Symbol parent was undefined. #40684
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
Comments
(Experimental duplicate detection)
|
None of the suggested "duplicates" seem to be related to code-completion. |
Can you share the project or at least the file the caused this error? |
I've create a stripped version of one of my projects, where this behavior occurs. You can check it out at https://github.com/nyn3x/vscode-autocomplete-error If you go to the |
Thanks. I confirmed the crash. Here's the stack from TypeScript
|
It seems this issue #40355 is related. I a little bit investigated it and ran into this crash. I used the following test to reproduce the issue /// <reference path='fourslash.ts'/>
// @esModuleInterop: true
// @moduleResolution: node
// @target: es2015
// @module: esnext
// @Filename: /node_modules/@bar/foo/index.d.ts
//// export = Foo;
//// declare class Foo {}
//// declare namespace Foo {} // class/namespace declaration causes the issue
// @Filename: /node_modules/foo/index.d.ts
//// import * as Foo from "@bar/foo";
//// export = Foo;
// @Filename: /index.ts
//// import Foo from "foo";
//// /**/
goTo.file("/index.ts");
verify.completions({
marker: "",
includes: ["Foo"],
preferences: {
includeCompletionsForModuleExports: true
}
}); Error: Debug Failure. Symbol parent was undefined. Flags: ExportDoesNotSupportDefaultModifier|Alias|AliasExcludes|ModuleMember|Classifiable|Transient. Declarations: undefined.
at getSymbolParentOrFail (src/services/utilities.ts:2885:22)
at Object.getNameForExportedSymbol (src/services/utilities.ts:2879:58)
at pushSymbol (src/services/completions.ts:1727:33)
at /TypeScript/src/services/completions.ts:1711:106
at Map.forEach (<anonymous>)
at getSymbolsFromOtherSourceFileExports (src/services/completions.ts:1711:50)
... At first glance, the crash occurs because of TypeScript/src/services/completions.ts Line 1658 in 7c6462a
TypeScript/src/services/completions.ts Line 1727 in 7c6462a
TypeScript/src/services/utilities.ts Line 2879 in 7c6462a
|
I can confirm I'm having the same problem with TypeScript v.4.0.x in my VSCode. I have to stick to v.3.9.7 for now unless there's a workaround? |
Hmm - but that doesn't seem to work for me. I changed in the package.json the typescript to "^3.9.7" and then set the typescript-sdk to the local workspace. But still I get
|
Hmm... interesting, 3.9.7 works for me, it doesn't throw that error and the suggestions work. Interestingly, when I tried a fresh project (I use Next.js), there was no error at all with 4.0.2, so I'm suspecting one of the dependencies in my project may be causing that issue... |
maybe - I did upload a sample-project, which shows this error ... It seems that However - why did I include this setting in my project? I guess it was, so I don't get errors when doing |
The problem is in "esModuleInterop": true I try with all TypeScript versions but all with same error. |
I'm having the same problem with a nextJS project. When i disable |
Uh oh!
There was an error while loading. Please reload this page.
TS Template added by @mjbvz
TypeScript Version: 4.1.0-dev.20200921
Search Terms
Steps to Reproduce:
In any *.ts or *.js file, when I try to use auto-completion for eg
console
by typingcon
and then pressing[STRG]+[SPACE]
I'm not prompted with the expectedconsole
. However: once I completed typingconsole
I get suggestions forconsole
's members.Looking at the "Log (Extension Host)" I see the following error:
However: for a split second, this seems to work alright - maybe before the internal initialization of some vscode routine complete?
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: