Skip to content

Crash in VS Code #481

Open
Open
@JonnyBurger

Description

Initial checklist

  • I read the support docs
    I read the contributing guide
    I agree to follow the code of conduct
    I searched issues and couldn’t find anything (or linked relevant results below)

Affected packages and versions

1.8.11

Link to runnable example

No response

Steps to reproduce

Open a MDX in VS Code

Expected behavior

No Crash

Actual behavior

[Info  - 10:27:07] Connection to server got closed. Server will restart.
true
/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:41833
  const rootExpression = (_a = sourceFile.statements[0]) == null ? void 0 : _a.expression;
                                                    ^

TypeError: Cannot read properties of undefined (reading '0')
    at convertConfigFileToObject (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:41833:53)
    at parseOwnConfigOfJsonSourceFile (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:42667:16)
    at parseConfig (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:42566:97)
    at parseJsonConfigFileContentWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:42294:24)
    at Object.parseJsonSourceFileConfigFileContent (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:42263:18)
    at a (/Users/jonathanburger/.vscode/extensions/unifiedjs.vscode-mdx-1.8.11/out/language-server.js:897:19013)
    at /Users/jonathanburger/.vscode/extensions/unifiedjs.vscode-mdx-1.8.11/out/language-server.js:897:18633
    at $fe (/Users/jonathanburger/.vscode/extensions/unifiedjs.vscode-mdx-1.8.11/out/language-server.js:85:5357)
    at d (/Users/jonathanburger/.vscode/extensions/unifiedjs.vscode-mdx-1.8.11/out/language-server.js:85:12248)
    at S (/Users/jonathanburger/.vscode/extensions/unifiedjs.vscode-mdx-1.8.11/out/language-server.js:85:12018)

Affected runtime and version

code --version: 1.94.0 d78a74bcdfad14d5d3b1b782f87255d802b57511 arm64

Affected package manager and version

No response

Affected OS and version

No response

Build and bundle tools

Docusaurus

Activity

added
👋 phase/newPost is being triaged automatically
🤞 phase/openPost is being triaged manually
and removed
👋 phase/newPost is being triaged automatically
on Oct 12, 2024
remcohaszing

remcohaszing commented on Oct 17, 2024

@remcohaszing
Member

Please provide a repo to reproduce the issue.

github-actions

github-actions commented on Oct 17, 2024

@github-actions
Contributor

Hi! Thanks for taking the time to contribute! This has been marked by a maintainer as needing a reproduction: It’s not yet clear whether this is a problem. Here are a couple tips:

  • Thoroughly document how to reproduce the problem, in steps or with code
  • Don’t link to your complete project: make the repro as tiny as possible, preferrably with only the problematic project in question
  • Make sure you’re on the latest versions of projects (and node/npm/yarn!)
  • The best issue report is a failing test proving it

Thanks,
— bb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Crash in VS Code · Issue #481 · mdx-js/mdx-analyzer