Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open /home/username/go/src/github.com/maxence-charriere/app/logo.png: no such file or directory #309

Closed
bh90210 opened this issue Oct 28, 2019 · 3 comments

Comments

@bh90210
Copy link

bh90210 commented Oct 28, 2019

Hello @maxence-charriere

I am trying to build the demo (goapp init -v ) outsite $GOPATH and I am getting the following error

goapp run -v -b default
‣ building wasm app
‣ building server
‣ installing go wasm support file
‣ generating etag
‣ generating service worker
‣ generating icons
x open /home/username/go/src/github.com/maxence-charriere/app/logo.png: no such file or directory

search for a solution I came across this thread and comment in particular golang/go#31529 (comment)

indeed after go get -u -v github.com/maxence-charriere/app/cmd/goapp while
goapp init -v & goapp build -v & goapp update -v work fine the directory $GOPATH/go/src/github.com/maxence-charriere/app/ doesn't exist.

Am I doing something wrong?

@maxence-charriere
Copy link
Owner

I think it requires that you have github.com/maxence-charriere/app installed with go get.
Usually your go repo are located in GOPATH/src/...

Unless you are using go mod.

If it's the case can you give be the step to reproduce?

  • Where you repo is located
  • the commands you used before running goapp run

@bh90210
Copy link
Author

bh90210 commented Oct 28, 2019

hey, I just saw you answered asap, 👍

yes I am using go mod, I assumed it was alright since in the getting started the $GOPATH step was marked as optional.

this is what I 've tried

$ mkdir app 
$ cd app
$ goapp init -v
‣ initializing project layout
‣ generating /home/username/testing/app/cmd/app-server/main.go
‣ generating /home/username/testing/app/cmd/app-wasm/main.go
✔ initialization succeeded
$ go mod init app
go: creating new go.mod: module app
$ goapp build -v
‣ building wasm app
    go: finding github.com/maxence-charriere/app latest
    go: finding golang.org/x/net latest
    app/cmd/app-wasm
‣ building server
    app/cmd/app-server
‣ installing go wasm support file
‣ generating etag
‣ generating service worker
‣ generating icons
x open /home/username/go/src/github.com/maxence-charriere/app/logo.png: no such file or directory

if I run go get -u -v github.com/maxence-charriere/app/cmd/goapp everything is stored under pkg instead of src:
Screenshot_20191028_183138

I think this is related to the conversation I linked? Maybe I am just misunderstanding something..

@bh90210
Copy link
Author

bh90210 commented Oct 28, 2019

uh I am so sorry, this was unrelated to you.

I had GO111MODULE=on, to solve my problem I just GO111MODULE=auto go get -u -v github.com/maxence-charriere/app/cmd/goapp

@bh90210 bh90210 closed this as completed Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants