运行 dep ensure 时出错:清单、锁和供应商的分组写入:无法统计 VerifyVendor 声称存在的文件
Error when running dep ensure: Grouped write of manifest, lock and vendor: could not stat file that VerifyVendor claimed existed
当 运行 dep ensure
:
时出现以下错误
Grouped write of manifest, lock and vendor: could not stat file that
VerifyVendor claimed existed: stat "path to package inside vendor": no such file or directory
这是我的 Gopkg.toml
:
[[constraint]]
name = "github.com/PuerkitoBio/goquery"
version = "1.5.0"
[[constraint]]
branch = "master"
name = "github.com/auth0-community/go-auth0"
[[constraint]]
name = "github.com/aws/aws-sdk-go"
version = "1.16.32"
[[constraint]]
name = "github.com/coocood/freecache"
version = "1.0.1"
[[constraint]]
branch = "master"
name = "github.com/gregjones/httpcache"
[[constraint]]
branch = "master"
name = "github.com/julienschmidt/httprouter"
[[constraint]]
branch = "master"
name = "github.com/justinas/alice"
[[constraint]]
name = "github.com/microcosm-cc/bluemonday"
version = "1.0.2"
[[constraint]]
name = "github.com/mssola/user_agent"
version = "0.4.1"
[[constraint]]
name = "github.com/rs/cors"
version = "1.6.0"
[[constraint]]
name = "github.com/sethgrid/pester"
version = "1.0.0"
[[constraint]]
name = "github.com/sirupsen/logrus"
version = "1.3.0"
[[constraint]]
name = "github.com/stretchr/testify"
version = "1.3.0"
[[constraint]]
name = "gopkg.in/dgrijalva/jwt-go.v3"
version = "3.2.0"
[[constraint]]
name = "gopkg.in/square/go-jose.v2"
version = "2.2.2"
我通过删除供应商目录解决了这个问题。
运行 dep ensure
再次重新创建了包含所有必需依赖项的供应商文件夹。
有时也可以通过修复文件夹权限来解决此问题,但删除文件夹似乎是解决此问题的最简单方法。
只是 运行 遇到了一个类似的问题,删除 $GOPATH/pkg/dep/sources 为我解决了它。
当 运行 dep ensure
:
Grouped write of manifest, lock and vendor: could not stat file that VerifyVendor claimed existed: stat "path to package inside vendor": no such file or directory
这是我的 Gopkg.toml
:
[[constraint]]
name = "github.com/PuerkitoBio/goquery"
version = "1.5.0"
[[constraint]]
branch = "master"
name = "github.com/auth0-community/go-auth0"
[[constraint]]
name = "github.com/aws/aws-sdk-go"
version = "1.16.32"
[[constraint]]
name = "github.com/coocood/freecache"
version = "1.0.1"
[[constraint]]
branch = "master"
name = "github.com/gregjones/httpcache"
[[constraint]]
branch = "master"
name = "github.com/julienschmidt/httprouter"
[[constraint]]
branch = "master"
name = "github.com/justinas/alice"
[[constraint]]
name = "github.com/microcosm-cc/bluemonday"
version = "1.0.2"
[[constraint]]
name = "github.com/mssola/user_agent"
version = "0.4.1"
[[constraint]]
name = "github.com/rs/cors"
version = "1.6.0"
[[constraint]]
name = "github.com/sethgrid/pester"
version = "1.0.0"
[[constraint]]
name = "github.com/sirupsen/logrus"
version = "1.3.0"
[[constraint]]
name = "github.com/stretchr/testify"
version = "1.3.0"
[[constraint]]
name = "gopkg.in/dgrijalva/jwt-go.v3"
version = "3.2.0"
[[constraint]]
name = "gopkg.in/square/go-jose.v2"
version = "2.2.2"
我通过删除供应商目录解决了这个问题。
运行 dep ensure
再次重新创建了包含所有必需依赖项的供应商文件夹。
有时也可以通过修复文件夹权限来解决此问题,但删除文件夹似乎是解决此问题的最简单方法。
只是 运行 遇到了一个类似的问题,删除 $GOPATH/pkg/dep/sources 为我解决了它。