Home>Article>Backend Development> Solve the problem of go: inconsistent vendoring when installing the air framework in GO language

Solve the problem of go: inconsistent vendoring when installing the air framework in GO language

藏色散人
藏色散人 forward
2020-11-20 15:07:12 15603browse

The following column ofgolang tutorialwill introduce to you how to solve the problem of go: inconsistent vendoring when installing the air framework inGO language. I hope Help those in need!

Solve the problem of go: inconsistent vendoring when installing the air framework in GO language

Problems encountered when installing the air framework in GO

When using VS Code, I want to install the air framework to It supports web page hot reloading function, but when installing, I got an error of go: inconsistent vendoring, which stopped me from running air. I asked the teacher of the course, and the teacher also said that it was the first time I encountered it. Later, I found a solution.

1. Reason

#This situation is caused by the gopath path and goroot path being consistent.

2. Solution

Modify GOPAHT to a non-GOROOT path. GOROOT is the GO language installation path, and GOPATH is the path required for the GO language compilation environment, so the two cannot be the same path. After modification, reload the mod through go mod init, and then execute air, and it will be successful.

The above is the detailed content of Solve the problem of go: inconsistent vendoring when installing the air framework in GO language. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:learnku.com. If there is any infringement, please contact admin@php.cn delete