简体   繁体   中英

Error when running dep ensure: Grouped write of manifest, lock and vendor: could not stat file that VerifyVendor claimed existed

I'm getting the following error when running 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

This is my 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"

I resolved this issue by deleting the vendor directory.

Running dep ensure again re-created the vendor folder with all required dependencies.

This can sometimes also be resolved by fixing up the folder permissions, but deleting the folder seems to be the easiest way to fix this.

Just ran into an analogous issue, deleting $GOPATH/pkg/dep/sources solved it for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM