在Windows上运行Revel软件包失败

When I run my packaged Revel app on Windows I get the following error:

C:\app>go run main.go ERROR 2015/12/09 16:02:21 revel.go:276: Failed to import with error: import "": invalid import path exit status 1

I'm running version: v0.12.0

Is this a known issue?

UPDATE: I revoke this question. Works perfectly well. Packaged artifacts from running (revel package appname) go to current directory. It was creating main.go in my apps's src directory, but this isn't valid.

duanpu1111
duanpu1111 是的,这是正确的。package命令将压缩后的文件夹输出到当前目录。
接近 5 年之前 回复
duancuan6466
duancuan6466 您是否正确设置了工作区?
接近 5 年之前 回复

1个回答



我认为您应该将源代码放在“%GOPATH%\ src”下,但是您要在“ C”下运行应用程序: \应用程序”。 您确定要在正确的文件夹中工作吗?</ p>

我注意到的另一件事是,您应该使用revel命令运行revel应用程序。 我认为“运行”不会与狂欢兼容。</ p>

这里是 在Azure应用服务(OS为Windows)上运行的示例示例应用repo 。 请参考 RevelDeploy.cmd CustomRun.bat ,应该能够为您提供一些指导。</ p>
</ div>

展开原文

原文

i would think you should place your source code under "%GOPATH%\src", but you are running your app under "C:\app". are you sure you are working at the right folder?

another thing i notice is, you should run your revel app with revel command. I don`t think "go run" will compatible with revel.

Here is a sample revel app repo that runs on Azure App Service (OS is windows). Please reference RevelDeploy.cmd and CustomRun.bat, should be able to provide you some guidance.

doudong2149
doudong2149 就像我说的,我撤销了这个问题。 工作正常。 谢谢。
接近 5 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐