[GO] module 에러 모음

타키탸키·2022년 11월 18일

verifying module error

문제

Go 웹 프로그램 개발을 위해 fiber 모듈을 설치하려는데 다음과 같은 에러가 등장했다

... verifying module: github.com/...: initializing sumdb.Client: reading tree note: malformed note

해결

  1. GOPATH의 /pkg/sumdb/sum.golang.org에서 latest 파일 삭제
  2. go clean -modcache으로 mod 캐시 삭제

이후, mod를 다시 설치하면 정상적으로 설치가 진행된다.

자세한 내용은 아래 링크를 참고할 것을 권장한다.
https://github.com/golang/go/issues/38348


outside of a module error - vs code

문제

You are outside of a module and outside of $GOPATH/src
+ error loading workspace packages.load error

해결

--> vs code "src" 폴더에서 열기
--> 모듈이 있는 프로젝트마다 go mod init [프로젝트명] & go mod tidy
--> src에서 go work init ./(문제의 작업 폴더)

profile
There's Only One Thing To Do: Learn All We Can

0개의 댓글