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. ATC'22顶会论文RunD:高密高并发的轻量级 Serverless 安全容器运行时 | 龙蜥技术

    简介: RunD可以在88毫秒内启动,并且在104核384GB内存的单节点上每秒启动超过200个安全容器. 编者按:目前的安全容器软件栈 - 包括 host 操作系统中的 cgroup.guest 操 ...

  2. 实时化或成必然趋势?新一代 Serverless 实时计算引擎

    作者:高旸(吾与),阿里巴巴高级产品专家 本文由阿里巴巴高级产品专家高旸(吾与)分享,主要介绍新一代Serverless实时计算引擎的产品特性及核心功能. 一.实时计算 Flink 版 – 产品定位与 ...

  3. 阿里云EMAS旗下低代码平台Mobi开放定向内测

    ​简介:[低代码深度共创]EMAS旗下低代码平台Mobi开放定向内测名额,限时限量,参与调研先到先得! Mobi是面向全端(Web.Native App.H5.全平台小程序等)场景,模型驱动的低代码开 ...

  4. 阿里大数据云原生化实践,EMR Spark on ACK 产品介绍

    开源大数据社区 & 阿里云 EMR 系列直播 第六期   主题:EMR spark on ACK 产品演示及最佳实践   讲师:石磊,阿里云 EMR 团队技术专家 内容框架: 云原生化挑战及阿 ...

  5. 双11特刊|购物车实时显示到手价,看云原生内存数据库Tair如何提升用户体验?

    ​阿里云自研内存数据库Tair诞生于2009年,是一种支持高并发低延迟访问的云原生内存数据库,完全兼容Redis,已历经多年双11大促考验,提供核心在线访问加速能力,显著提升系统吞吐量. 作为双11大 ...

  6. 2019-7-3-Roslyn-理解-msbuild-的清理过程

    title author date CreateTime categories Roslyn 理解 msbuild 的清理过程 lindexi 2019-07-03 18:21:25 +0800 20 ...

  7. Angular cli 组件和服务的创建, 父传子,子传父,服务的简单使用

    1:Angular cli 创建组件component ng g component components\right ng g c wave 简写 需要定位到根路径下即可创建组件 Could not ...

  8. .NET开源、功能强大、跨平台的图表库 - LiveCharts2

    前言 今天大姚给大家分享一个.NET开源(MIT License).功能强大.简单.灵活.跨平台的图表.地图和仪表库:LiveCharts2.   项目介绍 LiveCharts2是一个.NET开源. ...

  9. 基于 RedHat 系的 Linux 常用命令 & 常见系统设定

    闲言碎语 除特定指明外,本文默认基于 RedHat Enterprise Linux 8+ 的阐述. 基于CentOS推出的开源系统,国内的阿里推出Anolis OS,华为的OpenEuler.为填补 ...

  10. 几种常见Ruby on Rails内置方法介绍

    Ruby on Rails是一个功能强大的WEB开发框架,在这里我们将会学到一些经常用到的Ruby on Rails内置方法,帮助大家熟练掌握其应用技巧. Ruby on Rails自动生成文档技巧大 ...