Trouble Shooting

  • buffalo new fails looking for golang.org/x/tools/go/gcimporter

    This is caused by an outdated copy of the github.com/motemen/gore package. To fix simply update gore:

    $ go get -u github.com/motemen/gore
    

    For information see https://github.com/gobuffalo/buffalo/issues/108 and https://github.com/motemen/gore/issues/63.

  • buffalo dev fails to start with Unknown

    When starting $ buffalo dev, and you encounter this error:

    There was a problem starting the dev server: Unknown, Please review the troubleshooting docs.
    

    This may be due to your system missing NodeJS/NPM, Ensure that Node/NPM is installed and is in your $PATH. If Node/NPM are indeed in your $PATH, try renaming webpack.config.js.

    If you are still having issues after attempting the steps above, please reach out to the community in the #buffalo channel on Gophers Slack.

  • package context: unrecognized import path "context" (import path does not begin with hostname)

    When trying to install Buffalo go get returns this error:

    package context: unrecognized import path "context" (import path does not begin with hostname)
    

    This is due to an outdated version of Go. Buffalo requires Go 1.7 or higher. Please check your installation of Go and ensure you running the latest version.

  • Error: unexpected directory layout: during go get

    Occasionally when running go get on Buffalo you will get the following error:

    unexpected directory layout:
    import path: github.com/mattn/go-colorable
    dir: /go/src/github.com/fatih/color/vendor/github.com/mattn/go-colorable
    expand dir: /go/src/github.com/fatih/color/vendor/github.com/mattn/go-colorable
    separator: /
    

    This issue has been reported previously the Go team, https://github.com/golang/go/issues/17597.

    The best way to solve this problem is to run go get again, and it seems to fix itself.

  • Error: in application.js from UglifyJs

    If you get this error when running buffalo build you need to update your webpack.config.js to work with https://github.com/gobuffalo/buffalo/pull/350/files.

  • Error: Killed 9 when running buffalo on Mac OS X with Go 1.8.0

    This is a known issue with Go, https://github.com/golang/go/issues/19734, not with Buffalo.

    The best solution is to upgrade to Go 1.8.1 and rebuild your Go binaries.

  • Mac OS X: Too many open files in system error

    If you get this error when running buffalo dev that means you are "watching" too many files, either .go files or asset files. To correct this you can change the maximum number of open files on your system.

  • buffalo new fails trying to run goimports

    The full error may appear something like the following, and seems to be the result of outdated go tools. To resolve run rm -r $GOPATH/src/golang.org/, then run go get again.

    $ buffalo new code
    Buffalo version v0.9.2
    
    --> go get -u golang.org/x/tools/cmd/goimports
    package golang.org/x/tools/cmd/goimports: golang.org/x/tools is a custom import path for https://go.googlesource.com/tools, but /Users/dkinder/go/src/golang.org/x/tools is checked out from https://code.google.com/p/go.tools
    --> goimports -w .
    Usage:
      buffalo new [name] [flags]
    
    Flags:
          --api                  skip all front-end code and configure for an API server
          --ci-provider string   specify the type of ci file you would like buffalo to generate [none, travis, gitlab-ci] (default "none")
          --db-type string       specify the type of database you want to use [postgres, mysql, sqlite3] (default "postgres")
          --docker string        specify the type of Docker file to generate [none, multi, standard] (default "multi")
      -f, --force                delete and remake if the app already exists
      -h, --help                 help for new
          --skip-dep             skips adding github.com/golang/dep to your app
          --skip-pop             skips adding pop/soda to your app
          --skip-webpack         skips adding Webpack to your app
      -v, --verbose              verbosely print out the go get/install commands
          --with-yarn            allows the use of yarn instead of npm as dependency manager
    
    Error: exit status 1