Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
522 views
in Technique[技术] by (71.8m points)

visual studio code - VSCODE: Error: TypeError: Cannot read property 'get' of undefined

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

question from:https://stackoverflow.com/questions/65835470/vscode-error-typeerror-cannot-read-property-get-of-undefined

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...