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

[BUG]Cannot run demo out of GOPATH #310

Closed
linkerlin opened this issue Nov 26, 2019 · 3 comments
Closed

[BUG]Cannot run demo out of GOPATH #310

linkerlin opened this issue Nov 26, 2019 · 3 comments

Comments

@linkerlin
Copy link

If I put the demo app out of GOPATH, for example ~/gos/,
goapp run -v -b chrome
will report a error:
can't load package: package /Users/xxxxxxxx/gos/demo/cmd/demo-wasm: import "/Users/xxxxxxxx/gos/demo/cmd/demo-wasm": cannot import absolute path

@jonericcook
Copy link

I get the same error

joneric.cook@Work-MacBook-Pro demo % goapp run -v -b chrome ‣ building wasm app can't load package: package /Users/joneric.cook/Desktop/demo/cmd/demo-wasm: import "/Users/joneric.cook/Desktop/demo/cmd/demo-wasm": cannot import absolute path x exit status 1

@CJH9004
Copy link

CJH9004 commented Nov 28, 2019

try go mod init /

@maxence-charriere
Copy link
Owner

You have to use go mod init while it is still in the go path.
Then do go mod tidy
And once those 2 things are done you can move it wherever you want.

Closing this since it is not an issue related to this package.

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

4 participants