When writing Golang code in VS Code for Windows, the following error occurs:
Error loading workspace: err: exit status 1: stderr: build flag -mod=readonly only valid when using modules : packages.Load error
Solutions:
Enter the following on the command line:
go env -w GO111MODULE=on
Read More:
- VSCode Error: collect2.exe:error:1d returned 1 exit status [How to Solve]
- [Solved] error getting credentials – err: exit status GDBus.Error:org.freedesktop.DBus.Error.ServiceU
- [Solved] VsCode + gfortran Compiler Error: error: ld returned 1 exit status
- [Solved] VScode Error: undefined reference to ‘WinMain’ collect2.exe: error: ld returned 1 exit status
- VSCode Error: collect2.exe: error: ld returned 1 exit status
- How to Solve Docker ERROR: Service’workspace’ failed to build: ERROR: Service’php-fpm’ failed to build
- [Solved] VScode Error: build constraints exclude all Go files in syscall\js
- DevC++ Error: [Error] Id returned 1 exit status [How to Solve]
- Vue Package Error: npm ERR! missing script: build
- docker load Error processing tar file(exit status 1): archive/tar: invalid tar header
- [Solved] Wepy build watch Error: ERR! Parse WePY config failed. Are you trying to use
- Dev C++ Error: error: ld returned 1 exit status [How to Solve]
- NVM use error: exit status [How to Solve]
- [Solved] go cobra Error: required flag(s) “pkg-name” not set
- [Solved] error adding symbols: File in wrong format collect2: error: ld returned 1 exit status
- [Solved] VScode Error: PS D:\vscode> cd “d:\vscode\“ ; if ($?) { g++ tempCodeRunnerFile.cpp -o tempCodeRunn
- GCC Error:(.text+0x24): undefined reference to `main‘collect2: error: ld returned 1 exit status [Solved]
- Yolox_s.pth Convert to tensorRT Error: AttributeError: ‘tensorrt.tensorrt.Builder‘ object has no attribute ‘max_workspace_size‘
- An error occurs when trying to pipe a python program to CD- sys.excepthook is missing lost sys.stderr
- After SpringBoot starts, exit the console directly and display Process finished with exit code 1