Giter VIP home page Giter VIP logo

Comments (14)

npiganeau avatar npiganeau commented on May 29, 2024

Yes. There is sample here: https://github.com/hexya-erp/hexya-demo/blob/master/hexya.toml

from hexya.

gleke avatar gleke commented on May 29, 2024

Thanks!
I use the hexya.toml ,but I find these errors!

Modules = [
"github.com/hexya-addons/web"
]
LogStdout = true
#LogFile = ""
LogLevel = "info"
Debug = true
Demo = true
#DataDir = ""

[DB]
Driver = "postgres"
Host = "127.0.0.1"
Port = 5432
User = "gleke"
Password = "gleke"
Name = "hexya"
#SSLMode = false
#SSLCert = ""
#SSLKey = ""
#SSLCA = ""

[Server]
Languages = ["all"]
#Interface = ""
Port = 8080
#Domain = ""
#Certificate = ""
#PrivateKey = ""

gleke@gleke-QTJ5:~/hexya/hexya-demo$ hexya server -o
Please wait, Hexya is starting ...

github.com/hexya-addons/base

../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:35: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:52: undefined: m.AttachmentData
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:71:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:76:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:81:33: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:99:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:105:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:116:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:137:30: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: too many errors

github.com/hexya-addons/web/controllers

../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:11: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:32: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:28:10: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:33:10: undefined: h.Company
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:145:9: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:199:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:199:12: too many errors

from hexya.

npiganeau avatar npiganeau commented on May 29, 2024

Did you follow the steps of http://hexya.io/docs/install/ ?

It seems you did not run hexya generate or that it failed.

from hexya.

gleke avatar gleke commented on May 29, 2024
gleke@gleke-QTJ5:~/hexya$ ls
cmd  go.mod  hexya       hexya.toml  main     README.md     src
doc  go.sum  hexya-demo  LICENSE     main.go  run_tests.sh
gleke@gleke-QTJ5:~/hexya$ hexya generate myproject
Hexya Generate
	--------------
Modules paths:
 - github.com/hexya-addons/web
1/5 - Loading program...Ok
2/5 - Generating symlinks...Ok
3/5 - Generating pool...Ok
4/5 - Checking the generated code...Ok
5/5 - Creating main.go in project...Ok
Pool generated successfully
gleke@gleke-QTJ5:~/hexya$ ls
cmd  go.mod  hexya       hexya.toml  main     myproject  run_tests.sh
doc  go.sum  hexya-demo  LICENSE     main.go  README.md  src
gleke@gleke-QTJ5:~/hexya$ cd myproject/
gleke@gleke-QTJ5:~/hexya/myproject$ ls
main.go  pool
gleke@gleke-QTJ5:~/hexya/myproject$ hexya project init
Config File "hexya" Not Found in "[/etc/hexya /home/gleke/.hexya /home/gleke/hexya/myproject]"
You must specify a project path.
gleke@gleke-QTJ5:~/hexya/myproject$ ls
main.go  pool

gleke@gleke-QTJ5:~/hexya/myproject$ ls
hexya.toml  main.go  pool
gleke@gleke-QTJ5:~/hexya/myproject$ 
gleke@gleke-QTJ5:~/hexya/myproject$ ls
hexya.toml  main.go  pool
gleke@gleke-QTJ5:~/hexya/myproject$ hexya server -o
Please wait, Hexya is starting ...
# github.com/hexya-addons/base
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:35: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:52: undefined: m.AttachmentData
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:71:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:76:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:81:33: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:99:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:105:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:116:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:137:30: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: too many errors
# github.com/hexya-addons/web/controllers
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:11: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:32: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:28:10: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:33:10: undefined: h.Company
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:145:9: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:198:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:198:12: too many errors
gleke@gleke-QTJ5:~/hexya/myproject$ 

from hexya.

npiganeau avatar npiganeau commented on May 29, 2024
gleke@gleke-QTJ5:~/hexya/myproject$ hexya project init
Config File "hexya" Not Found in "[/etc/hexya /home/gleke/.hexya /home/gleke/hexya/myproject]"
You must specify a project path.

You must do hexya project init github.com/gleke/myhexyaproject

where github.com/gleke/myhexyaproject can be anything and don't need to be an actual github project. It's needed because a hexya project must be a go module.

from hexya.

gleke avatar gleke commented on May 29, 2024
gleke@gleke-QTJ5:~$ cd hexya/
gleke@gleke-QTJ5:~/hexya$ hexya project init github.com/gleke/myhexyaproject
go mod init: go.mod already exists
exit status 1
gleke@gleke-QTJ5:~/hexya$ ls
cmd  go.mod  hexya       hexya.toml  main     myproject  run_tests.sh
doc  go.sum  hexya-demo  LICENSE     main.go  README.md  src
gleke@gleke-QTJ5:~/hexya$ nano hexya.toml
gleke@gleke-QTJ5:~/hexya$ cd myproject/
gleke@gleke-QTJ5:~/hexya/myproject$ hexya server -o
Please wait, Hexya is starting ...
# github.com/hexya-addons/base
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:35: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:52: undefined: m.AttachmentData
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:71:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:76:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:81:33: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:99:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:105:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:116:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:137:30: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: too many errors
# github.com/hexya-addons/web/controllers
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:11: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:32: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:28:10: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:33:10: undefined: h.Company
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:145:9: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:198:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:198:12: too many errors
gleke@gleke-QTJ5:~/hexya/myproject$ cd ..
gleke@gleke-QTJ5:~/hexya$ ls
cmd  doc  go.mod  go.sum  hexya  hexya-demo  hexya.toml  LICENSE  main  main.go  myproject  README.md  run_tests.sh  src
gleke@gleke-QTJ5:~/hexya$ hexya project init github.com/gleke/myhexyaproject
Config File "hexya" Not Found in "[/etc/hexya /home/gleke/.hexya /home/gleke/hexya]"
go: creating new go.mod: module github.com/gleke/myhexyaproject
Config File "hexya" Not Found in "[/etc/hexya /home/gleke/.hexya /home/gleke/hexya]"
gleke@gleke-QTJ5:~/hexya$ go mod tidy
go: finding module for package github.com/hexya-erp/hexya/cmd
go: finding module for package golang.org/x/tools/go/packages
go: finding module for package github.com/hexya-erp/hexya/src/tools/nbutils
go: finding module for package github.com/smartystreets/goconvey/convey
go: finding module for package github.com/hexya-erp/hexya/src/models/types/dates
go: finding module for package github.com/hexya-erp/hexya/src/menus
go: finding module for package github.com/hexya-erp/hexya/src/tools/logging
go: finding module for package github.com/gin-contrib/sessions
go: finding module for package github.com/hexya-erp/hexya/src/reports
go: finding module for package github.com/hexya-erp/hexya/src/tools/xmlutils
go: downloading github.com/gin-contrib/sessions v0.0.3
go: finding module for package github.com/hexya-erp/hexya/src/controllers
go: downloading golang.org/x/tools v0.0.0-20200930213115-e57f6d466a48
go: finding module for package github.com/hexya-erp/hexya/src/tools/generate
go: finding module for package github.com/hexya-erp/hexya/src/models/security
go: downloading github.com/hexya-erp/hexya v0.1.7
go: finding module for package github.com/hexya-erp/hexya/src/models/fieldtype
go: finding module for package github.com/spf13/cobra
go: finding module for package github.com/gin-gonic/gin
go: finding module for package github.com/hexya-erp/hexya/src/models/operator
go: finding module for package github.com/hexya-erp/hexya/src/tools/po
go: finding module for package github.com/disintegration/imaging
go: finding module for package github.com/hexya-erp/hexya/src/views
go: finding module for package github.com/hexya-erp/hexya/src/server
go: finding module for package github.com/hexya-erp/hexya/src/tools/strutils
go: downloading github.com/spf13/cobra v1.0.0
go: downloading github.com/disintegration/imaging v1.6.2
go: finding module for package github.com/flosch/pongo2
go: finding module for package github.com/hexya-erp/pool/h
go: downloading github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3
go: finding module for package github.com/hexya-erp/pool/m
go: finding module for package golang.org/x/crypto/pbkdf2
go: finding module for package github.com/cockroachdb/apd/v2
go: downloading github.com/cockroachdb/apd/v2 v2.0.2
go: downloading golang.org/x/crypto v0.0.0-20200930160638-afb6bcd081ae
go: finding module for package github.com/google/uuid
go: finding module for package github.com/hexya-erp/hexya/src/tools/typesutils
go: finding module for package github.com/spf13/viper
go: finding module for package github.com/hexya-erp/hexya/src/models/fields
go: downloading github.com/google/uuid v1.1.2
go: downloading github.com/spf13/viper v1.7.1
go: finding module for package github.com/hexya-erp/hexya/src/i18n
go: finding module for package github.com/jmoiron/sqlx
go: finding module for package github.com/hexya-erp/hexya/src/models/types
go: finding module for package github.com/gin-gonic/gin/render
go: finding module for package github.com/hexya-erp/hexya/src/actions
go: finding module for package github.com/hexya-erp/hexya/src/tools/fileutils
go: finding module for package golang.org/x/crypto/acme/autocert
go: finding module for package github.com/beevik/etree
go: finding module for package go.uber.org/zap
go: finding module for package github.com/hexya-erp/hexya/src/models
go: finding module for package github.com/gin-contrib/sessions/cookie
go: finding module for package github.com/lib/pq
go: downloading go.uber.org/zap v1.16.0
go: downloading github.com/lib/pq v1.8.0
go: finding module for package github.com/hexya-erp/hexya/src/tools/hweb
go: finding module for package github.com/hexya-erp/hexya/src/tools/exceptions
go: finding module for package github.com/hexya-erp/hexya/src/tests/testmodule
go: finding module for package github.com/hexya-erp/hexya/src/templates
go: finding module for package github.com/gin-contrib/pprof
go: downloading github.com/gin-contrib/pprof v1.3.0
go: finding module for package github.com/hexya-erp/pool/q
go: found github.com/hexya-erp/hexya/cmd in github.com/hexya-erp/hexya v0.1.7
go: found github.com/gin-contrib/pprof in github.com/gin-contrib/pprof v1.3.0
go: found github.com/gin-gonic/gin in github.com/gin-gonic/gin v1.6.3
go: found github.com/spf13/cobra in github.com/spf13/cobra v1.0.0
go: found github.com/spf13/viper in github.com/spf13/viper v1.7.1
go: found golang.org/x/tools/go/packages in golang.org/x/tools v0.0.0-20200930213115-e57f6d466a48
go: found github.com/beevik/etree in github.com/beevik/etree v1.1.0
go: found github.com/google/uuid in github.com/google/uuid v1.1.2
go: found github.com/jmoiron/sqlx in github.com/jmoiron/sqlx v1.2.0
go: found github.com/lib/pq in github.com/lib/pq v1.8.0
go: found github.com/gin-contrib/sessions in github.com/gin-contrib/sessions v0.0.3
go: found golang.org/x/crypto/acme/autocert in golang.org/x/crypto v0.0.0-20200930160638-afb6bcd081ae
go: found github.com/hexya-erp/pool/h in github.com/hexya-erp/pool v1.0.2
go: found github.com/disintegration/imaging in github.com/disintegration/imaging v1.6.2
go: found github.com/flosch/pongo2 in github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3
go: found go.uber.org/zap in go.uber.org/zap v1.16.0
go: found github.com/cockroachdb/apd/v2 in github.com/cockroachdb/apd/v2 v2.0.2
go: found github.com/smartystreets/goconvey/convey in github.com/smartystreets/goconvey v1.6.4
go: downloading gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b
go: downloading golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8
go: downloading github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e
go: downloading golang.org/x/net v0.0.0-20200822124328-c89045814202
go: downloading google.golang.org/appengine v1.6.1
gleke@gleke-QTJ5:~/hexya$ hexya generate myproject2
Hexya Generate
	--------------
Modules paths:
 - github.com/hexya-addons/web
1/5 - Loading program...Ok
2/5 - Generating symlinks...Ok
3/5 - Generating pool...Ok
4/5 - Checking the generated code...Ok
5/5 - Creating main.go in project...Ok
Pool generated successfully
gleke@gleke-QTJ5:~/hexya$ ls
cmd  doc  go.mod  go.sum  hexya  hexya-demo  hexya.toml  LICENSE  main  main.go  myproject  myproject2  README.md  run_tests.sh  src
gleke@gleke-QTJ5:~/hexya$ cd myproject2
gleke@gleke-QTJ5:~/hexya/myproject2$ ls
main.go  pool
gleke@gleke-QTJ5:~/hexya/myproject2$ hexya server -o
Config File "hexya" Not Found in "[/etc/hexya /home/gleke/.hexya /home/gleke/hexya/myproject2]"
Please wait, Hexya is starting ...
# github.com/hexya-addons/base
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:35: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:52: undefined: m.AttachmentData
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:71:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:76:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:81:33: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:99:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:105:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:116:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:137:30: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: too many errors
# github.com/hexya-addons/web/controllers
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:11: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:32: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:28:10: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:33:10: undefined: h.Company
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:145:9: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:198:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:198:12: too many errors
gleke@gleke-QTJ5:~/hexya/myproject2$ ls
main.go  pool
gleke@gleke-QTJ5:~/hexya/myproject2$ ls
hexya.toml  main.go  pool
gleke@gleke-QTJ5:~/hexya/myproject2$ hexya server -o
Please wait, Hexya is starting ...
# github.com/hexya-addons/base
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:35: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:52: undefined: m.AttachmentData
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:71:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:76:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:81:33: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:99:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:105:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:116:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:137:30: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: too many errors
# github.com/hexya-addons/web/controllers
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:11: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:32: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:28:10: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:33:10: undefined: h.Company
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:145:9: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:198:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:198:12: too many errors
gleke@gleke-QTJ5:~/hexya/myproject2$ 


from hexya.

npiganeau avatar npiganeau commented on May 29, 2024

It seems you are not clear as which is your project directory. You have to choose if it is hexya or hexya/myproject2 and execute all hexya commands inside your project directory as defined in the documentation.

from hexya.

gleke avatar gleke commented on May 29, 2024

1Creating a custom project

gleke@gleke-QTJ5:~$ cd hexya/
gleke@gleke-QTJ5:~/hexya$ cd myproject
gleke@gleke-QTJ5:~/hexya/myproject$ ls
gleke@gleke-QTJ5:~/hexya/myproject$ hexya project init github.com/myusername/myhexyaproject
Config File "hexya" Not Found in "[/etc/hexya /home/gleke/.hexya /home/gleke/hexya/myproject]"
go: creating new go.mod: module github.com/myusername/myhexyaproject
Config File "hexya" Not Found in "[/etc/hexya /home/gleke/.hexya /home/gleke/hexya/myproject]"
gleke@gleke-QTJ5:~/hexya/myproject$ ls
go.mod  hexya.toml

2Generate Hexya

gleke@gleke-QTJ5:~/hexya/myproject$ hexya generate .
Hexya Generate
	--------------
Modules paths:
 - github.com/hexya-addons/web
1/5 - Loading program...Ok
2/5 - Generating symlinks...Ok
3/5 - Generating pool...Ok
4/5 - Checking the generated code...Ok
5/5 - Creating main.go in project...Ok
Pool generated successfully
gleke@gleke-QTJ5:~/hexya/myproject$ ls
go.mod  go.sum  hexya.toml  main.go  pool

3Synchronise database

4Synchronise database schema with models

gleke@gleke-QTJ5:~/hexya/myproject$ hexya updatedb -o
Please wait, Hexya is starting ...
# github.com/hexya-addons/base
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:35: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:52: undefined: m.AttachmentData
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:71:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:76:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:81:33: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:99:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:105:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:116:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:137:30: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: too many errors
# github.com/hexya-addons/web/controllers
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:11: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:32: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:28:10: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:33:10: undefined: h.Company
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:145:9: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:198:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:198:12: too many errors

5Running Hexya

gleke@gleke-QTJ5:~/hexya/myproject$ hexya server -o
Please wait, Hexya is starting ...
# github.com/hexya-addons/base
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:35: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:61:52: undefined: m.AttachmentData
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:71:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:76:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:81:33: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:99:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:105:28: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:116:29: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:137:30: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: undefined: m.AttachmentSet
../../go/pkg/mod/github.com/hexya-addons/[email protected]/attachment.go:155:31: too many errors
# github.com/hexya-addons/web/controllers
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/action.go:24:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:11: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/assets.go:99:32: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:28:10: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/binary.go:33:10: undefined: h.Company
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:58:33: undefined: q.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/session.go:145:9: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:198:12: undefined: h.User
../../go/pkg/mod/github.com/hexya-addons/[email protected]/controllers/webclient.go:198:12: too many errors
gleke@gleke-QTJ5:~/hexya/myproject$ 

hexya.toml

configfilename = ""
datadir = "/home/gleke/.hexya"
debug = false
demo = false
logfile = ""
loglevel = "info"
logstdout = false
modules = ["github.com/hexya-addons/web"]
resourcedir = "./res"

[db]
  driver = "postgres"
  host = "localhost"
  name = "hexya"
  password = "gleke"
  port = "5432"
  sslca = ""
  sslcert = ""
  sslkey = ""
  sslmode = "disable"
  user = "gleke"

[server]
  certificate = ""
  domain = ""
  interface = ""
  languages = []
  port = "8080"
  privatekey = ""

from hexya.

npiganeau avatar npiganeau commented on May 29, 2024

Can you cat your go.mod and the content of pool/ ?

from hexya.

gleke avatar gleke commented on May 29, 2024

go.mod

module github.com/myusername/myhexyaproject

go 1.14

replace github.com/hexya-erp/pool v1.0.2 => /home/gleke/hexya/myproject/pool

require (
        github.com/hexya-addons/web v0.1.7
        github.com/hexya-erp/hexya v0.1.7
        github.com/spf13/cobra v0.0.5
)

pool

gleke@gleke-QTJ5:~/hexya/myproject$ cd pool
gleke@gleke-QTJ5:~/hexya/myproject/pool$ ls
go.mod  h  m  q
gleke@gleke-QTJ5:~/hexya/myproject/pool$ 

go.mod

// This file is autogenerated by hexya-generate
// DO NOT MODIFY THIS FILE - ANY CHANGES WILL BE OVERWRITTEN

module github.com/hexya-erp/pool
gleke@gleke-QTJ5:~/hexya/myproject/pool$ cd h
gleke@gleke-QTJ5:~/hexya/myproject/pool/h$ ls
temp.go
gleke@gleke-QTJ5:~/hexya/myproject/pool/h$ cd m

temp.go

// This file is autogenerated by hexya-generate
// DO NOT MODIFY THIS FILE - ANY CHANGES WILL BE OVERWRITTEN

package h

from hexya.

npiganeau avatar npiganeau commented on May 29, 2024

Strange.

It seems that hexya generate did not work completely. go mod is correct (in particular the 'replace' directive), but the pool package is not generated as it should. I'll have a look.

from hexya.

npiganeau avatar npiganeau commented on May 29, 2024

It works on my side. Here is what I did, so you can check if you see any difference.

Hexya git repo (github.com/hexya-erp/hexya) directory to compile the Hexya binary

npiganeau@NPI-XPS:~/Progs/hexya/hexya (master) $ date
dim. 11 oct. 2020 13:47:49 CEST
npiganeau@NPI-XPS:~/Progs/hexya/hexya (master) $ git pull
Already up to date.
npiganeau@NPI-XPS:~/Progs/hexya/hexya (master) $ go install
npiganeau@NPI-XPS:~/Progs/hexya/hexya (master) $ ls -l $(which hexya)
-rwxrwxr-x 1 npiganeau npiganeau 24010257 oct.  11 13:47 /home/npiganeau/Progs/go/bin/hexya*

Creating Hexya project:

npiganeau@NPI-XPS:~/Progs/hexya$ mkdir test
npiganeau@NPI-XPS:~/Progs/hexya$ cd test/
npiganeau@NPI-XPS:~/Progs/hexya/test$ ls
npiganeau@NPI-XPS:~/Progs/hexya/test$ hexya project init github.com/myusername/myhexyaproject
Config File "hexya" Not Found in "[/etc/hexya /home/npiganeau/.hexya /home/npiganeau/Progs/hexya/test]"
go: creating new go.mod: module github.com/myusername/myhexyaproject
Config File "hexya" Not Found in "[/etc/hexya /home/npiganeau/.hexya /home/npiganeau/Progs/hexya/test]"
npiganeau@NPI-XPS:~/Progs/hexya/test$ ls
go.mod  hexya.toml
npiganeau@NPI-XPS:~/Progs/hexya/test$ cat go.mod 
module github.com/myusername/myhexyaproject

go 1.15
npiganeau@NPI-XPS:~/Progs/hexya/test$ cat hexya.toml 
configfilename = ""
datadir = "/home/npiganeau/.hexya"
debug = false
demo = false
logfile = ""
loglevel = "info"
logstdout = false
modules = ["github.com/hexya-addons/web"]
resourcedir = "./res"

[db]
  driver = "postgres"
  host = "/var/run/postgresql"
  name = "hexya"
  password = ""
  port = "5432"
  sslca = ""
  sslcert = ""
  sslkey = ""
  sslmode = "disable"
  user = ""

[server]
  certificate = ""
  domain = ""
  interface = ""
  languages = []
  port = "8080"
  privatekey = ""
npiganeau@NPI-XPS:~/Progs/hexya/test$ hexya generate .
Hexya Generate
	--------------
Modules paths:
 - github.com/hexya-addons/web
1/5 - Loading program...Ok
2/5 - Generating symlinks...Ok
3/5 - Generating pool...Ok
4/5 - Checking the generated code...Ok
5/5 - Creating main.go in project...Ok
Pool generated successfully
npiganeau@NPI-XPS:~/Progs/hexya/test$ ls
go.mod  go.sum  hexya.toml  main.go  pool  res
npiganeau@NPI-XPS:~/Progs/hexya/test$ cd pool/
npiganeau@NPI-XPS:~/Progs/hexya/test/pool$ ls
go.mod  h  m  q
npiganeau@NPI-XPS:~/Progs/hexya/test/pool$ cd h/
npiganeau@NPI-XPS:~/Progs/hexya/test/pool/h$ ls
attachment       config_parameter     currency_rate     partner_category.go     temp.go
attachment.go    config_parameter.go  currency_rate.go  partner.go              translation
auto_vacuum      config_settings      filter            partner_industry        translation.go
auto_vacuum.go   config_settings.go   filter.go         partner_industry.go     user
bank             country              group             partner_title           user_change_password_wizard
bank_account     country.go           group.go          partner_title.go        user_change_password_wizard.go
bank_account.go  country_group        image_mixin       queue_channel           user_change_password_wizard_line
bank.go          country_group.go     image_mixin.go    queue_channel.go        user_change_password_wizard_line.go
base_mixin       country_state        lang              queue_job               user.go
base_mixin.go    country_state.go     lang.go           queue_job.go            user_log
common_mixin     cron                 model_mixin       sequence                user_log.go
common_mixin.go  cron.go              model_mixin.go    sequence_date_range
company          currency             partner           sequence_date_range.go
company.go       currency.go          partner_category  sequence.go

from hexya.

gleke avatar gleke commented on May 29, 2024

your set: host = "/var/run/postgresql"
my set: host = "localhost"
my system: ubuntu 18.04 go 1.15
I find also failed create database table when I set host = "/var/run/postgresql"
the hexya can't connect the database,but database user and password is right.

from hexya.

gleke avatar gleke commented on May 29, 2024

my system: ubuntu 18.04 go 1.15
I find also failed create database table when I set host = "/var/run/postgresql"
the hexya can't connect the database,but database user and password is right.

from hexya.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.