VSCODE: Error: TypeError: Cannot read property 'get' of undefined

Viewed 3398

Visual Studio Code does not recognize errors for golang files. It works fine for other programming languages but when i create a go file does not recognize the errors even if i am doing it on purpose. Even the file has no error or has error there is a warning "Error: TypeError: Cannot read property 'get' of undefined"

OS: ubuntu 18.04

visual studio: 1.52.1

golang: 1.14.8

vsgolang error

1 Answers

VS Code Go extension v0.21.0 introduced this bug which was fixed in v0.21.1.

Read patch notes here -> https://github.com/golang/vscode-go/releases/tag/v0.21.1

VS code will automatically pick up the extension update but requires a restart.

Or you could uninstall extension, re-install extension (v0.21.1 or higher) and reload VS code.

Related