gobuffalo / buffalo

Rapid Web Development w/ Go
http://gobuffalo.io
MIT License
8.08k stars 576 forks source link

buffalo build -d just gives up #1221

Closed c0debreaker closed 6 years ago

c0debreaker commented 6 years ago

Version - go version go1.10.3 darwin/amd64

Buffalo - Buffalo version is: v0.11.1

DEBU[0012] WARNING in application.0ac009431529a648e3f1.js from UglifyJs
DEBU[0012] Condition always true [application.0ac009431529a648e3f1.js:10316,5]
DEBU[0012] Condition always false [application.0ac009431529a648e3f1.js:10379,18]
DEBU[0012] Condition always true [application.0ac009431529a648e3f1.js:10379,123]
DEBU[0012] Dropping unreachable code [application.0ac009431529a648e3f1.js:10383,4]
DEBU[0012] Side effects in initialization of unused variable t [application.0ac009431529a648e3f1.js:14617,6]
DEBU[0012]
DEBU[0012] WARNING in chat.0ac009431529a648e3f1.js from UglifyJs
DEBU[0012] Condition always true [chat.0ac009431529a648e3f1.js:10327,5]
DEBU[0012]
DEBU[0012] WARNING in Chart.min.0ac009431529a648e3f1.js from UglifyJs
DEBU[0012] Condition always false [Chart.min.0ac009431529a648e3f1.js:94,18]
DEBU[0012] Condition always true [Chart.min.0ac009431529a648e3f1.js:94,123]
DEBU[0012] Dropping unreachable code [Chart.min.0ac009431529a648e3f1.js:98,4]
DEBU[0012] Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--1-2!node_modules/sass-loader/lib/loader.js??ref--1-3!assets/css/application.scss:
DEBU[0012]        [0] ./node_modules/css-loader?{"sourceMap":true}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./assets/css/application.scss 8.39 kB {0} [built]
DEBU[0012]         + 1 hidden module
DEBU[0012]
DEBU[0012] running go build -i -v -o bin/api -ldflags -X main.BuildVersion=f99eeca -X main.BuildTime="2018-08-07T23:49:59-05:00"
buffalo_build_main.go:9:3: local import "../../CrewApp/src/git.internalgitsvr.com/crew/api/a" in non-local package
buffalo_build_main.go:10:3: local import "../../CrewApp/src/git.internalgitsvr.com/crew/api/actions" in non-local package
buffalo_build_main.go:17:3: local import "../../CrewApp/src/git.internalgitsvr.com/crew/api/grifts" in non-local package
buffalo_build_main.go:14:3: local import "../../CrewApp/src/git.internalgitsvr.com/crew/api/models" in non-local package
DEBU[0013] restoring /Users/rcamara/CrewApp/src/git.internalgitsvr.com/crew/api/main.go
INFO[0013] ~~~ BUILD CANCELLED ~~~
Usage:
  buffalo build [flags]

Aliases:
  build, b, bill

Flags:
  -c, --compress                   compress static files in the binary (default true)
  -d, --debug                      print debugging information
      --environment string         set the environment for the binary (default "development")
  -e, --extract-assets             extract the assets and put them in a distinct archive
  -h, --help                       help for build
      --ldflags string             set any ldflags to be passed to the go build
  -o, --output string              set the name of the binary (default "bin/api")
  -k, --skip-assets                skip running webpack and building assets
      --skip-template-validation   skip validating plush templates
  -s, --static                     build a static binary using  --ldflags '-linkmode external -extldflags "-static"'
  -t, --tags string                compile with specific build tags

ERRO[0013] Error: exit status 1
markbates commented 6 years ago

Your GOPATH is either incorrect or you’re outside of it. Can you please paste buffalo info output?

c0debreaker commented 6 years ago

Is it because I don't have BUFFALOPATH? One sec, let me run that command

c0debreaker commented 6 years ago

Here is the output of buffalo info

https://gist.github.com/c0debreaker/a354cd8bed508453deece3075fe8e5f0

markbates commented 6 years ago

You’re using multiple GOPATHs, generally considered a bad idea because it breaks a lot of tooling. Also, the GOPATH you want to use is second, so it’s trying to use the first GOPATH and you get ../../ stuff.

Fix your GOPATH and things should work.

-- Mark Bates On Aug 10, 2018, 9:07 AM -0400, c0debreaker notifications@github.com, wrote:

Here is the output of buffalo info https://gist.github.com/c0debreaker/a354cd8bed508453deece3075fe8e5f0 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

c0debreaker commented 6 years ago

Got it. Do I remove GOROOT?

markbates commented 6 years ago

Yes. That’s old and should point to the Go installation, not your source code.

This guide should help, https://www.gopherguides.com/courses/preparing-your-environment-for-go-development

-- Mark Bates On Aug 10, 2018, 9:16 AM -0400, c0debreaker notifications@github.com, wrote:

Got it. Do I remove GOROOT? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

c0debreaker commented 6 years ago

Got it. Anyways, I tried single GOPATH, still no go

https://gist.github.com/c0debreaker/5552940a28b85eecd525b67aacab2aff

markbates commented 6 years ago

Did you fix all the broken imports from when you generated the app? You didn’t show the error after you changed the GOPATH. Your files are all corrupted with bad paths and need to be fixed before you can compile.

-- Mark Bates On Aug 10, 2018, 9:20 AM -0400, c0debreaker notifications@github.com, wrote:

Got it. Anyways, I tried single GOPATH, still no go https://gist.github.com/c0debreaker/5552940a28b85eecd525b67aacab2aff — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

c0debreaker commented 6 years ago

sorry. The error was the same as my first post above. I'm currently following the installation instructions from the link you sent. I'll complete and test. I will provide more info.

c0debreaker commented 6 years ago

my go is good

 ❯ go run main.go
2018/08/10 08:34:47 Success!

I went inside my original project which is under $HOME/go/src/some/path/there then I ran go get.

The go get is stalled. Not showing any signs of movement.

I ran ls -l $HOME/go/pkg, still empty even after more than 5 mins.

c0debreaker commented 6 years ago

Finally it stopped and got this error

 ❯ go get
# gitserver/crew/api/actions
actions/websocket.go:10:16: c.Websocket undefined (type buffalo.Context has no field or method Websocket)

I'll try it again once I get to work. Maybe because I'm tethered to my cellphone

markbates commented 6 years ago

It was removed in the last release. https://blog.gobuffalo.io/buffalo-v0-12-0-released-c8412c7198f0

-- Mark Bates On Aug 10, 2018, 9:46 AM -0400, c0debreaker notifications@github.com, wrote:

Finally it stopped and got this error ❯ go get

gitserver/crew/api/actions

actions/websocket.go:10:16: c.Websocket undefined (type buffalo.Context has no field or method Websocket) — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

c0debreaker commented 6 years ago

Here's the latest. I think the error is the same

 ❯ buffalo version
INFO[0000] Buffalo version is: v0.12.0

 ❯ go get
# gitserver/crew/api/actions
actions/websocket.go:10:16: c.Websocket undefined (type buffalo.Context has no field or method Websocket)

and here's the output of buffalo info - https://gist.github.com/c0debreaker/35fd4714026bcbae4a1accc5cda1ddb3

markbates commented 6 years ago

Its the same error, because that method doesn’t exist. See the link in my previous comment.

c0debreaker commented 6 years ago

Oh I thought you mentioned it was removed from version 0.11. So I downloaded version 0.12 Got it