升級go1.10後打包出錯
小白請教:
之前 1.8 和 1.9 都正常,今天升級到 1.10 發現打包出來的執行檔案執行報錯 在 mac 和 win10 打包成 linux bee pack -be=GOOS=linux 執行時:
panic: you are in dev mode. So please set gopath
goroutine 1 [running]:
github.com/astaxie/beego.(*ControllerRegister).Include(0xc4200c0790, 0xc4201dfc30, 0x1, 0x1)
E:/m/go/src/github.com/astaxie/beego/router.go:231 +0x789
github.com/astaxie/beego.(*Namespace).Include(0xc4202290a0, 0xc4201dfc30, 0x1, 0x1, 0xc4202290a0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:186 +0x4d
github.com/astaxie/beego.NSInclude.func1(0xc4202290a0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:302 +0x46
github.com/astaxie/beego.NewNamespace(0xaae8aa, 0x9, 0xc42008d388, 0x1, 0x1, 0xc420231101)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
github.com/astaxie/beego.NSNamespace.func1(0xc420229080)
E:/m/go/src/github.com/astaxie/beego/namespace.go:386 +0x52
github.com/astaxie/beego.NewNamespace(0xaae88f, 0x9, 0xc420183e98, 0x18, 0x18, 0xc420231170)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
aaa-api/routers.init.1()
E:/m/go/src/aaa-api/routers/router.go:20 +0x17f4
panic: you are in dev mode. So please set gopath
goroutine 1 [running]:
github.com/astaxie/beego.(*ControllerRegister).Include(0xc4200c0840, 0xc4201dfc30, 0x1, 0x1)
E:/m/go/src/github.com/astaxie/beego/router.go:231 +0x789
github.com/astaxie/beego.(*Namespace).Include(0xc42022b0c0, 0xc4201dfc30, 0x1, 0x1, 0xc42022b0c0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:186 +0x4d
github.com/astaxie/beego.NSInclude.func1(0xc42022b0c0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:302 +0x46
github.com/astaxie/beego.NewNamespace(0xaae8aa, 0x9, 0xc42008d388, 0x1, 0x1, 0xc420235101)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
github.com/astaxie/beego.NSNamespace.func1(0xc42022b0a0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:386 +0x52
github.com/astaxie/beego.NewNamespace(0xaae88f, 0x9, 0xc420185e98, 0x18, 0x18, 0xc420235170)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
aaa-api/routers.init.1()
E:/m/go/src/aaa-api/routers/router.go:20 +0x17f4
panic: you are in dev mode. So please set gopath
goroutine 1 [running]:
github.com/astaxie/beego.(*ControllerRegister).Include(0xc4200ae6e0, 0xc4201cbc60, 0x1, 0x1)
E:/m/go/src/github.com/astaxie/beego/router.go:231 +0x789
github.com/astaxie/beego.(*Namespace).Include(0xc4202150e0, 0xc4201cbc60, 0x1, 0x1, 0xc4202150e0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:186 +0x4d
github.com/astaxie/beego.NSInclude.func1(0xc4202150e0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:302 +0x46
github.com/astaxie/beego.NewNamespace(0xaae8aa, 0x9, 0xc42000d398, 0x1, 0x1, 0xc420221101)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
github.com/astaxie/beego.NSNamespace.func1(0xc4202150c0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:386 +0x52
github.com/astaxie/beego.NewNamespace(0xaae88f, 0x9, 0xc420169e98, 0x18, 0x18, 0xc420221170)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
aaa-api/routers.init.1()
E:/m/go/src/aaa-api/routers/router.go:20 +0x17f4
panic: you are in dev mode. So please set gopath
goroutine 1 [running]:
github.com/astaxie/beego.(*ControllerRegister).Include(0xc4200c0790, 0xc4201dfc30, 0x1, 0x1)
E:/m/go/src/github.com/astaxie/beego/router.go:231 +0x789
github.com/astaxie/beego.(*Namespace).Include(0xc4202270c0, 0xc4201dfc30, 0x1, 0x1, 0xc4202270c0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:186 +0x4d
github.com/astaxie/beego.NSInclude.func1(0xc4202270c0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:302 +0x46
github.com/astaxie/beego.NewNamespace(0xaae8aa, 0x9, 0xc42008d388, 0x1, 0x1, 0xc420233101)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
github.com/astaxie/beego.NSNamespace.func1(0xc4202270a0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:386 +0x52
github.com/astaxie/beego.NewNamespace(0xaae88f, 0x9, 0xc420183e98, 0x18, 0x18, 0xc420233170)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
aaa-api/routers.init.1()
E:/m/go/src/aaa-api/routers/router.go:20 +0x17f4
我是用 Supervisord 部署的,之前一直正常。 然後把模式又 dev 轉成 prod 就不報錯了,為什麼呢?都只能用 prod 了?
更多原創文章乾貨分享,請關注公眾號
- 加微信實戰群請加微信(註明:實戰群):gocnio
相關文章
- [BUG反饋]升級後獨立模型出錯模型
- 升級Win11後 我的docker-compose ps 出錯Docker
- python3升級後的報錯Python
- pip 升級後runpy.py報錯
- VSCode外掛開發全攻略(十)打包、釋出、升級VSCode
- 【BUG系列】AndroidStudio打包出錯Android
- 打包升級:node-cron原理詳解
- MacOS Big Sur11.0升級後Eclipse啟動報錯MacEclipse
- AS打包出現app:transformClassesAndResourcesWithProguardForRelease錯誤APPORM
- flutter升級後 執行專案報錯 Warning: Podfile is out of dateFlutter
- thinkphp升級後報錯Declaration of thinkappUrl::build() must be compatible with think outeUrl::build():PHPAPPUI
- android 打包出現錯誤Error: ResourceNameAndroidError
- vue-cli 專案打包後出現空白頁和路徑錯誤Vue
- win10推送後如何升級 win10收到推送後怎麼升級Win10
- AndroidStudio升級到3.1+之後,出現Java.util.NoSuchElementExceptionAndroidJavaException
- ant打包出現null returned: 1報錯Null
- Istio 升級後踩的坑
- Cocopods的升級錯誤解決
- 常見的 PostgreSQL 升級錯誤SQL
- win10推送後怎麼升級_win10獲取推送後如何升級Win10
- w10升級後黑屏修復方法_w10升級後黑屏如何處理
- windows10系統升級助手出現錯誤的解決方法Windows
- Mac os 升級到11.0版本後 啟動擴充套件報錯Mac套件
- 升級win10 1909後開機數分鐘後出現卡死如何解決Win10
- vagrant box --ubuntu18 打包後,使用box 報錯Ubuntu
- 開啟 Gzip後打包 報錯compression-webpack-pluginWebPlugin
- 【Azure Function App】Azure Function 從.Net6 升級到 .Net8 後 Function出現執行時版本錯誤FunctionAPP
- 升級babel7後,直接引用element-ui中沒有暴露出來的元件image-viewer.vue導致的打包錯誤BabelUI元件ViewVue
- iOS 11.3正式版釋出:升級後iPhone可當公交卡使用iOSiPhone
- [BUG反饋]升級OT1.1開發版的時候出錯了
- Android Studio 升級3.5後,格式化XML佈局檔案層級順序錯亂問題AndroidXML
- 阿里雲 EMAS Serverless 升級釋出阿里Server
- chrome升級後audio不能播放解決Chrome
- Visual Studio 2019 升級16.8之後(升級.Net 5),RazorTagHelper任務意外失敗
- win10 1803升級1903後開機報錯程式碼80070002的解決方法Win10
- Webpack + Vue 多頁面專案升級 Webpack 4 以及打包優化WebVue優化
- ChainDesk:鏈碼的其它操作-實現對鏈碼的打包升級AI
- 升級優化Webpack4,使你的打包速度提升200%以上!優化Web
- zblog升級之後不能登入後臺怎麼回事