elixir-tools / elixir-tools.vscode

Visual Studio Code extension for Elixir
https://marketplace.visualstudio.com/items?itemName=elixir-tools.elixir-tools
Other
88 stars 9 forks source link

On activation: TypeError: Cannot read properties of undefined (reading 'replace') #50

Closed fhunleth closed 1 year ago

fhunleth commented 1 year ago

I did a fresh install of the elixir-tools extension in VSCode on MacOS. It's currently not starting and this seems to be the error.

2023-08-23 21:26:07.219 [error] Activating extension elixir-tools.elixir-tools failed due to an error:
2023-08-23 21:26:07.219 [error] TypeError: Cannot read properties of undefined (reading 'replace')
    at /Users/fhunleth/.vscode/extensions/elixir-tools.elixir-tools-0.7.0/dist/extension.js:2:430330
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /Users/fhunleth/.vscode/extensions/elixir-tools.elixir-tools-0.7.0/dist/extension.js:2:430078
    at async e.activate (/Users/fhunleth/.vscode/extensions/elixir-tools.elixir-tools-0.7.0/dist/extension.js:2:429825)
    at async p.n (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:102:6206)
    at async p.m (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:102:6169)
    at async p.l (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:102:5626)

Does any of this look familiar? If not, I'll dig in more.

mhanberg commented 1 year ago

Let me check real quick

mhanberg commented 1 year ago

seems like the github api returned something odd when fetching the latest version of credo language server.

i suspect you want to use Next LS tho, so you can disable credo and enable Next LS in the settings. Next LS 0.10+ includes a credo extension so it replaces credo language server anyway

mhanberg commented 1 year ago

This should have a better error message tho if that fails.

fhunleth commented 1 year ago

Disabling the credo language server did the trick. Thanks!