问题描述
这个问题似乎在
似乎启用了只读模式,但我不确定如何禁用它.我试过简单地增加 go.mod
上的文件权限,
chmod a+w go.mod
但无济于事.知道如何修复此错误并允许加载 Go 扩展程序吗?
此错误似乎已通过运行自行解决
去修改整洁
手动.不过,我仍然很好奇是什么导致了这种情况,因为扩展程序可能仍然无法正常工作.
This question appears to have been asked in Go updates to go.mod needed, disabled by -mod=readonly : packages.Load error but was not answered there, so re-posting it. Running Go 1.15.7, I'm trying to load a Go project with a go.mod
but VS Code is showing a notification with the following error:
Error loading workspace: err: exit status 1: stderr: go: updates to go.mod needed, disabled by -mod=readonly : packages.Load error
It seems that a read-only mode is enabled, but I'm not sure how to disable this. I've tried simply increasing the file permissions on go.mod
,
chmod a+w go.mod
but to no avail. Any idea how to fix this error and allow the Go extension to load?
This error appears to have resolved itself by just running
go mod tidy
manually. I'm still curious what caused this, though, as the extension might still not be fully working.
这篇关于由于无法更改 go.mod,VS Code Go 扩展无法加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!