英文:
"Setting up workspace: Loading packages..." takes too long
问题
每次我在VSCode中打开项目文件夹时,它都会显示"设置工作区:正在加载包..."。如果我以非管理员身份运行VSCode(Windows 11),就会出现以下错误信息:
加载工作区时出错:1个模块存在错误:nuxt-fetch-bug:pattern nuxt-fetch-bug/...: 打开 C:\Users\username\AppData\Local\ElevatedDiagnostics 失败:拒绝访问。
我不明白这与nuxt有什么关系。我只是想打开包含单个文件main.go的文件夹。
最令人烦恼的是,在此错误结束之前,我无法保存文件,甚至无法编写代码,因为没有自动完成或其他功能。
英文:
Every time I open the project folder in VSCode, it starts with "Setting up workspace: Loading packages...". If I run VSCode not as Administrator (windows 11) it will end up with this message:
Error loading workspace: 1 modules have errors: nuxt-fetch-bug:pattern nuxt-fetch-bug/...: open C:\Users\username\AppData\Local\ElevatedDiagnostics: Access is denied.
I don't understand what it has to do with nuxt actually. I am trying to open the folder with the single file - main.go.
Most annoying part of this is that I can't save files until it is ended, or even write code, because there is no autocompletion or anything else.
答案1
得分: 3
该问题发生在打开没有 go.mod 文件的项目时。使用 go mod init example
命令可以解决该问题。
英文:
Damn, figured that out. This happens when you open the project that don't have go.mod file.
go mod init example
solved the issue.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论