go.mod file not found in current directory or any parent directory; see 'go help modules' (exit status 1)

原因:

目录少缺少 go.mod 文件。

解决方法:

在终端中输入:

go mod init main

其中 main 是模块名。

go.mod file not found in current directory or any parent directory; see 'go help modules' (exit status 1)的更多相关文章

  1. go.mod file not found in current directory or any parent directory; see 'go help modules'

    go的环境设置问题,执行 go env -w GO111MODULE=auto 我的环境:Windows 7, Go 1.17 D:\Apps\GOPATH\src\code.oldboyedu.co ...

  2. go: go.mod file not found in current directory or any parent directory; see 'go help mod 解决

    go: go.mod file not found in current directory or any parent directory; see 'go help mod go:在当前目录或任何 ...

  3. [部署日记]GO在Visual Studio Code初次运行时提示go: go.mod file not found in current directory or any parent directory; see 'go help modules'

    我裂开,一波未平一波又起... 按照MS教程上填写 package main import "fmt" func main() { fmt.Println("Hello ...

  4. Understanding go.sum and go.mod file in Go

    https://golangbyexample.com/go-mod-sum-module/ Understanding go.sum and go.mod file in Go (Golang) – ...

  5. Docker: adding a file from a parent directory

    17down votefavorite 4 In my Dockerfile I've got : ADD ../../myapp.war /opt/tomcat7/webapps/ That fil ...

  6. 12C数据库ORA-40365: The SYS user cannot be locked while the password file is in its current format

    [环境介绍] 系统环境:Solaris + Oracle 12CR2   [背景描述] 基于集团数据库安全检查项,需要把sys用户锁定或者修改复杂口令整改. 在整改前已经对参数remote_login ...

  7. The directory '/home/stone/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If execu

    使用sudo pip install ......的时候出现下面一段黄色的代码: The directory '/home/stone/.cache/pip/http' or its parent d ...

  8. env: python3: No such file or directory exit status 127 FER ESPectro Core 编译出错

    苹果电脑安装了Arduino,布置ESP8266开发环境,编译程序过程中出现错误: env: python3:No such file or directoryexit status 127为开发板 ...

  9. 【解决了一个小问题】golang中引用一个路径较长的库,导致goland中出现"module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2"

    在项目中的go.mod文件中有这样一句: require ( github.com/xxx-devops/xx1/sdk/go v2.2.3 ) 项目的编译没有问题,但是goland中出现如下提示: ...

  10. mac brew 安装php扩展报错:parent directory is world writable but not sticky

    $ brew install php70-mcrypt 报错: Error: parent directory is world writable but not sticky 搜索到github的答 ...

随机推荐

  1. 力扣603(MySQL)-连续空余座位(简单)

    题目: 几个朋友来到电影院的售票处,准备预约连续空余座位. 你能利用表 cinema ,帮他们写一个查询语句,获取所有空余座位,并将它们按照 seat_id 排序后返回吗? 对于如上样例,你的查询语句 ...

  2. 力扣1668(java&python)-最大重复子字符串(简单)

    题目: 给你一个字符串 sequence ,如果字符串 word 连续重复 k 次形成的字符串是 sequence 的一个子字符串,那么单词 word 的 重复值为 k .单词 word 的 最大重复 ...

  3. 牛客网-SQL专项训练7

    ①SQL语言可以分为多个类别,那么不属于数据操纵语言DML的是(B) 解析: SQL语言共分为四大类:数据查询语言DQL,数据操纵语言DML,数据定义语言DDL,数据控制语言DCL. 1. 数据查询语 ...

  4. 浏览器扩展开发-Firefox临时载入附加组件(图)

    科普:[FE] Quasar BEX 热加载区别: Chrome vs Firefox 1. 2.  3. Thats all. Refer:Firefox扩展开发 Link:https://www. ...

  5. "友链"

    欢迎来到我的友链小屋 展示本站所有友情站点,排列不分先后,均匀打乱算法随机渲染的喔!   友链信息 博客名称:麋鹿鲁哟博客网址:https://www.cnblogs.com/miluluyo/博客头 ...

  6. QT 连接 MySQL 版本问题

    问题现象 SSL connection error: unknown error number QMYSQL: Unable to connect 问题原因 出现这样的现象是因为我QT使用的是5.7的 ...

  7. MySQL 数据库重置密码

    1.Linux 中 MySQL 数据库重置密码 停止服务:systemctl stop mysql 打开 my.cnf(没有则创建一个):vim /etc/my.cnf 在 [mysqld] 下添加: ...

  8. GitLab 管理 NuGet 包

    1 概览 在服务器上构建项目时,需要引用 nuget.org 之外的包,如公司内部开发的.第三方未发布到 nuget.org 上的.怎么办? GitLab 提供了 Package Registry 来 ...

  9. Github Copilot绑定Jetbrains IDE无效的解决方案

    在Github中进行教育认证后不会自动开通Copilot功能,因此,在进行了Github教育认证之后,在使用之前要进入Github Copilot官网开通Coplilot,如果忽略了这一点,绑定Jet ...

  10. linux diff求两个文件的差集

    awk 从文本中过滤出需要的ip queryId_20231109214653_ipBatchQueryResult.json {"id":0,"ip":&qu ...