Home > Backend Development > Golang > 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

藏色散人
Release: 2020-11-20 15:07:12
forward
15768 people have browsed it

The following column of golang tutorial will introduce to you how to solve the problem of go: inconsistent vendoring when installing the air framework in GO 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!

Related labels:
source:learnku.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template