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

Error when running `buffalo build` #1478

Closed
imorti opened this Issue Dec 2, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@imorti

imorti commented Dec 2, 2018

I generated a new app using buffalo new app.

I edited database.yml.

I ran buffalo db create -a.

All databases were created properly.

I ran buffalo generate resource affirmations

then ran soda migrations up.

I tested the basics (adding an affirmation).

I ran buffalo build and saw the following:

  1. ERRO[0014] Error: /Users/imorti/work/go/src/github.com/imorti/affirmations/a/database.go:17:27: expected ';', found url
  2. ERRO[0005] Error: fork/exec node_modules/.bin/webpack: no such file or directory

So I can't build the app.

Version info:

Buffalo Version

v0.13.7

App Information

Pwd=/Users/imorti/work/go/src/github.com/imorti/affirmations
Root=/Users/imorti/work/go/src/github.com/imorti/affirmations
GoPath=/Users/imorti/work/go
Name=affirmations
Bin=bin/affirmations
PackagePkg=github.com/imorti/affirmations
ActionsPkg=github.com/imorti/affirmations/actions
ModelsPkg=github.com/imorti/affirmations/models
GriftsPkg=github.com/imorti/affirmations/grifts
VCS=git
WithPop=true
WithSQLite=false
WithDep=false
WithWebpack=true
WithYarn=true
WithDocker=true
WithGrifts=true
WithModules=false

Go Version

go version go1.11.2 darwin/amd64

Go Env

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/imorti/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/imorti/work/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/22/69y6vvnj6s5b547bphmg2mpc0000gn/T/go-build137505818=/tmp/go-build -gno-record-gcc-switches -fno-common"

Node Version

v9.10.1

NPM Version

5.6.0

Yarn Version

1.0.2

PostgreSQL Version

pg_ctl (PostgreSQL) 10.3

MySQL Version

mysql Ver 14.14 Distrib 5.7.21, for osx10.13 (x86_64) using EditLine wrapper

SQLite Version

3.24.0 2018-06-04 14:10:15 95fbac39baaab1c3a84fdfc82ccb7f42398b2e92f18a2a57bce1d4a713cbaapl

Dep Version

could not find a Gopkg.toml file

Dep Status

could not find a Gopkg.toml file

go.mod

module github.com/imorti/affirmations

@boehmli

This comment has been minimized.

boehmli commented Dec 4, 2018

I can't reproduce the error, unfortunately.
I used buffalo v0.13.7 with soda v4.9.0 with mysql database works fine for me. Your provided commands look a little odd to me.
So i used just: buffalo generate resource affirmations
and soda migrate up
What version of pop are you running?

@imorti

This comment has been minimized.

imorti commented Dec 7, 2018

Also getting this now: <appname>/a/database.go:17:27: expected ';', found url

 buffalo-pop pop version
v4.9.3

pop v1.2.1
@imorti

This comment has been minimized.

imorti commented Dec 7, 2018

I also noticed when executing buffalo build a hundred+ buffalo-auth processes get kicked off.

@imorti

This comment has been minimized.

imorti commented Dec 8, 2018

ok so there's an issue with the way we deal with database.yml. By removing the following I was able to build:

The builder trips up when it hits the url section. Something about parsing url and parseTime.


test:
  dialect: "mysql"
  #
  # You can use a single URL string for the same configuration:
  #
  #
  # Note that if you use `url`, other configurations are silently ignored.
  # In this case, the URL must contain all required connection parameters.
  #
  database: "elevation_test"
  host: "localhost"
  port: "3306"
  user: "tackledb"
  password: "team3"

production:
  #
  # You can also use environmental variables to override values in this config.
  #
  #
  dialect: "mysql"
  database: "elevation_production"
  host: {{envOr "DATABASE_HOST" "localhost"}}
  port: {{envOr "DATABASE_PORT" "3306"}}
  user: {{envOr "DATABASE_USER" "tackledb"}}
  password: {{envOr "DATABASE_PASSWORD" "team3"}}
  #
  # And you can also override connection parameters by setting it under options.
  #
  #options:
  #  parseTime: true
  #  multiStatements: true
  #  readTimeout: 3s
  #  encoding: "utf8mb4_general_ci"
  #
  # CAUTION!
  #   `parseTime` and` multiStatements` must be set to `true` to work properly.
  #   If you are not sure, do not change (or set) these values.

@imorti imorti closed this Dec 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment