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

Error while creating CSS assets file #116

Open
goodforever opened this issue Jun 5, 2020 · 12 comments
Open

Error while creating CSS assets file #116

goodforever opened this issue Jun 5, 2020 · 12 comments

Comments

@goodforever
Copy link

When I run hexya server -o
Please wait, Hexya is starting ...

If I visit loclahost:8080
I got errors

2020/06/05 18:56:58 [Recovery] 2020/06/05 - 18:56:58 panic recovered:
Error while creating CSS assets file
error : unable to read input: write |1: broken pipe

.......

@npiganeau
Copy link
Member

Actually you need to install sass (http://www.sass-lang.com/install) and no longer need lessc.

I forgot to update the doc, I'll do it.

@goodforever
Copy link
Author

After npm install -g sass
I hexya generate . again, then
I run hexya server -o
2020-06-06T18:06:19.303+0800 INFO logging/logging.go:98 Hexya is up and running HTTP {"module": "server", "address": ":8080"}

Then I visit localhost:8080
I got same errors:(How can I do ? waitting for your new install doc)

2020-06-06T18:07:03.958+0800 INFO logging/logging.go:98 {"module": "server", "status": 303, "method": "GET", "path": "/", "ip": "::1", "latency": "116.43µs"}
2020-06-06T18:07:03.981+0800 INFO logging/logging.go:98 {"module": "server", "status": 303, "method": "GET", "path": "/web/", "ip": "::1", "latency": "339.926µs"}
2020-06-06T18:07:04.005+0800 INFO logging/logging.go:98 {"module": "server", "status": 200, "method": "GET", "path": "/web/login", "ip": "::1", "latency": "5.541927ms"}
2020-06-06T18:07:04.632+0800 ERROR logging/logging.go:68 Error while creating CSS assets file {"module": "web", "error": "unable to read input: write |1: broken pipe"}
github.com/hexya-erp/hexya/src/tools/logging.(*zapLogger).Panic
.........

@npiganeau
Copy link
Member

Is sass in your $PATH ?

i.e. does sass --version returns something ?

@npiganeau
Copy link
Member

If yes, can you send me the full stacktrace in the log ?

@goodforever
Copy link
Author

sass -version
Sass 3.4.18 (Selective Steve)

@goodforever
Copy link
Author

goodforever commented Jun 8, 2020

my go version
go version go1.14 darwin/amd64

hexya server -o
2020-06-08T22:52:13.280+0800 INFO logging/logging.go:98 Hexya is up and running HTTP {"module": "server", "address": ":8080"}

After visit localhost:8080

log

2020-06-08T22:52:36.444+0800 INFO logging/logging.go:98 {"module": "server", "status": 303, "method": "GET", "path": "/", "ip": "::1", "latency": "184.857µs"}
2020-06-08T22:52:36.457+0800 INFO logging/logging.go:98 {"module": "server", "status": 303, "method": "GET", "path": "/web/", "ip": "::1", "latency": "534.139µs"}
2020-06-08T22:52:36.468+0800 INFO logging/logging.go:98 {"module": "server", "status": 200, "method": "GET", "path": "/web/login", "ip": "::1", "latency": "2.547181ms"}
2020-06-08T22:52:36.582+0800 INFO logging/logging.go:98 {"module": "server", "status": 200, "method": "GET", "path": "/static/web/lib/select2/select2.css", "ip": "::1", "latency": "2.473821ms"}
2020-06-08T22:52:36.587+0800 INFO logging/logging.go:98 {"module": "server", "status": 200, "method": "GET", "path": "/static/web/lib/select2-bootstrap-css/select2-bootstrap.css", "ip": "::1", "latency": "7.823186ms"}
2020-06-08T22:52:36.587+0800 INFO logging/logging.go:98 {"module": "server", "status": 200, "method": "GET", "path": "/static/web/lib/fontawesome/css/font-awesome.css", "ip": "::1", "latency": "6.207291ms"}
2020-06-08T22:52:36.589+0800 INFO logging/logging.go:98 {"module": "server", "status": 200, "method": "GET", "path": "/static/web/lib/jquery.ui/jquery-ui.css", "ip": "::1", "latency": "24.037323ms"}
2020-06-08T22:52:36.596+0800 INFO logging/logging.go:98 {"module": "server", "status": 200, "method": "GET", "path": "/static/web/lib/es6-promise/es6-promise-polyfill.js", "ip": "::1", "latency": "6.284656ms"}
2020-06-08T22:52:36.617+0800 INFO logging/logging.go:98 {"module": "server", "status": 200, "method": "GET", "path": "/static/web/src/js/boot.js", "ip": "::1", "latency": "7.410173ms"}
2020-06-08T22:52:36.620+0800 INFO logging/logging.go:98 {"module": "server", "status": 200, "method": "GET", "path": "/static/web/lib/unhandled-rejection-polyfill/unhandled-rejection-polyfill.js", "ip": "::1", "latency": "11.004176ms"}
2020-06-08T22:52:36.623+0800 INFO logging/logging.go:98 {"module": "server", "status": 200, "method": "GET", "path": "/static/web/src/js/public/lazyloader.js", "ip": "::1", "latency": "5.92138ms"}
2020-06-08T22:52:36.634+0800 INFO logging/logging.go:98 {"module": "server", "status": 304, "method": "GET", "path": "/static/web/src/js/promise_extension.js", "ip": "::1", "latency": "359.476µs"}
2020-06-08T22:52:37.118+0800 ERROR logging/logging.go:68 Error while creating CSS assets file {"module": "web", "error": "unable to read input: write |1: broken pipe"}
github.com/hexya-erp/hexya/src/tools/logging.(*zapLogger).Panic
/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/tools/logging/logging.go:68
github.com/hexya-addons/web/controllers.createCompiledCSSFile
/Users/foo/work/gopath/pkg/mod/github.com/hexya-addons/web@v0.1.1/controllers/assets.go:47
github.com/hexya-addons/web/controllers.AssetsCommonCSS
/Users/foo/work/gopath/pkg/mod/github.com/hexya-addons/web@v0.1.1/controllers/assets.go:61
github.com/hexya-erp/hexya/src/server.wrapContextFuncs.func1.1
/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/server/routes.go:24
github.com/gin-gonic/gin.(*Context).Next
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124
github.com/hexya-erp/hexya/src/tools/logging.LogForGin.func1
/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/tools/logging/logging.go:265
github.com/gin-gonic/gin.(*Context).Next
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124
github.com/gin-contrib/sessions.Sessions.func1
/Users/foo/work/gopath/pkg/mod/github.com/gin-contrib/sessions@v0.0.1/sessions.go:65
github.com/gin-gonic/gin.(*Context).Next
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124
github.com/gin-gonic/gin.RecoveryWithWriter.func1
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/recovery.go:83
github.com/gin-gonic/gin.(*Context).Next
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/gin.go:389
github.com/gin-gonic/gin.(*Engine).ServeHTTP
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/gin.go:351
net/http.serverHandler.ServeHTTP
/Users/foo//go1.11/src/net/http/server.go:2807
net/http.(*conn).serve
/Users/foo//go1.11/src/net/http/server.go:1895
2020-06-08T22:52:37.123+0800 ERROR logging/logging.go:68 Error while creating CSS assets file {"module": "web", "error": "unable to read input: write |1: broken pipe"}
github.com/hexya-erp/hexya/src/tools/logging.(*zapLogger).Panic
/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/tools/logging/logging.go:68
github.com/hexya-addons/web/controllers.createCompiledCSSFile
/Users/foo/work/gopath/pkg/mod/github.com/hexya-addons/web@v0.1.1/controllers/assets.go:47
github.com/hexya-addons/web/controllers.AssetsFrontendCSS
/Users/foo/work/gopath/pkg/mod/github.com/hexya-addons/web@v0.1.1/controllers/assets.go:89
github.com/hexya-erp/hexya/src/server.wrapContextFuncs.func1.1
/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/server/routes.go:24
github.com/gin-gonic/gin.(*Context).Next
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124
github.com/hexya-erp/hexya/src/tools/logging.LogForGin.func1
/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/tools/logging/logging.go:265
github.com/gin-gonic/gin.(*Context).Next
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124
github.com/gin-contrib/sessions.Sessions.func1
/Users/foo/work/gopath/pkg/mod/github.com/gin-contrib/sessions@v0.0.1/sessions.go:65
github.com/gin-gonic/gin.(*Context).Next
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124
github.com/gin-gonic/gin.RecoveryWithWriter.func1
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/recovery.go:83
github.com/gin-gonic/gin.(*Context).Next
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/gin.go:389
github.com/gin-gonic/gin.(*Engine).ServeHTTP
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/gin.go:351
net/http.serverHandler.ServeHTTP
/Users/foo//go1.11/src/net/http/server.go:2807
net/http.(*conn).serve
/Users/foo//go1.11/src/net/http/server.go:1895

2020/06/08 22:52:37 [Recovery] 2020/06/08 - 22:52:37 panic recovered:
GET /web/assets/frontend.css HTTP/1.1
Host: localhost:8080
Accept: text/css,/;q=0.1
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Connection: keep-alive
Cookie: adminer_key=dab90115b5a72da61c076b04620a4c7b; MMAUTHTOKEN=pquktfkwo3dadkb899s4md3ywr; MMUSERID=pik6q9jw4fnkpepdxtsjpgs4kw; MMCSRF=p7osxryrgiyb5e33o31dckum9y; XSRF-TOKEN=b0c56840-b1f0-44cb-ad69-f3be51402f40; JSESSIONID=F4C326EEB8276226AD426D7167293093; _r_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODYwMTAzNzUsImp0aSI6IjIxYjRjNmNkLTZlM2UtNGRmOC1iZTY3LTk0OTdlOWM3YTYyZSIsImlhdCI6MTU4NTkyMzk3NSwiaXNzIjoicm9idXN0YSIsInN1YiI6IjIxYjRjNmNkLTZlM2UtNGRmOC1iZTY3LTk0OTdlOWM3YTYyZSIsIlJvbGVzIjpudWxsLCJBdmF0YXJVUkwiOiIiLCJOYW1lIjoiIiwiTGFzdE5hbWUiOiJMaSIsIkZpcnN0TmFtZSI6IkppYW5aaG9uZyIsIlVzZXJJRCI6IjIxYjRjNmNkLTZlM2UtNGRmOC1iZTY3LTk0OTdlOWM3YTYyZSJ9.r9jBmmvKH6eOQz1yvOTpbKRSwGoS0gGeFkCJKXaaa_E; _r_user=eyJpZCI6IjVlODc0NzZjM2I5ZjZjNDQ2MjE4NWVlZSIsImVtYWlsIjoibGlqekBtYWdvbGUuY29tIiwiZmlyc3RfbmFtZSI6IkppYW5aaG9uZyIsImxhc3RfbmFtZSI6IkxpIiwic3RhdHVzIjoiYWN0aXZlIiwicHJvdmlkZXIiOiJsb2NhbCIsInVzZXJfaWQiOiIyMWI0YzZjZC02ZTNlLTRkZjgtYmU2Ny05NDk3ZTljN2E2MmUiLCJjcmVhdGVkX2F0IjoiMjAyMC0wNC0wM1QxNDoyNTo0OC40OTZaIiwidXBkYXRlZF9hdCI6IjIwMjAtMDQtMDNUMTQ6MjU6NDguNDk2WiJ9; pholcusSession=e5eda2cffc139bdda26b6c5c42f42c91; ga=GA1.1.734421552.1587189291; adminer_sid=5b56ade507a3a52bd565846646e9ebac; sidebarStatus=1; Admin-Token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOiIxNTg5NjQyNzM2IiwiaWF0IjoiMTU4OTYzOTEzNiIsInV1aWQiOiI2YTQwZTZkYS1jNmU0LTQ2YmUtYWNjMS0xM2I0NzU5OGVhNmYifQ.jn35yL6GwoAz52fFSjjFnjNsflV4aog3BeA0QBUhMzQ; connect.sid=s%3A9bb81c7f-edad-41ee-8698-da6f8791f0d7.%2BNb2GAZzZLXsLsX45Q4GM94oGtf%2BIEqVoHyk8pLBCo8; hexya-session=MTU5MTM3MDc3N3w0b1BnN0lCY3NDQ3ZIaFZ3RHVRWnNNSzQyZ0RrVHhVcGtmMmpsS2lDOTNQYXRMQ0J8f3-qMB9_asxy3y6_6uNBNfmWZTewUN7YjwgtLAHfSg=; beegosessionID=4078a417003d9e15c21c5d57db1cc122; lang=zh-CN; Remember=; ERPSession=929e5505c2af979373f3ce1d14b85e9b
Referer: http://localhost:8080/web/login
Sec-Ch-Ua: "Google Chrome";v="83"
Sec-Ch-Ua-Mobile: ?0
Sec-Fetch-Dest: style
Sec-Fetch-Mode: no-cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36

Error while creating CSS assets file
error : unable to read input: write |1: broken pipe

/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/tools/logging/logging.go:74 (0x16084a0)
(*zapLogger).Panic: panic(panicData)
/Users/foo/work/gopath/pkg/mod/github.com/hexya-addons/web@v0.1.1/controllers/assets.go:47 (0x262e47d)
createCompiledCSSFile: log.Panic("Error while creating CSS assets file", "error", err)
/Users/foo/work/gopath/pkg/mod/github.com/hexya-addons/web@v0.1.1/controllers/assets.go:89 (0x262f3dd)
AssetsFrontendCSS: createCompiledCSSFile(fName, frontendList, bootstrapScssDir)
/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/server/routes.go:24 (0x1788599)
wrapContextFuncs.func1.1: f(&Context{Context: ctx})
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 (0x152a5da)
(*Context).Next: c.handlersc.index
/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/tools/logging/logging.go:265 (0x1609bf3)
LogForGin.func1: c.Next()
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 (0x152a5da)
(*Context).Next: c.handlersc.index
/Users/foo/work/gopath/pkg/mod/github.com/gin-contrib/sessions@v0.0.1/sessions.go:65 (0x16e1c4c)
Sessions.func1: c.Next()
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 (0x152a5da)
(*Context).Next: c.handlersc.index
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/recovery.go:83 (0x153be7f)
RecoveryWithWriter.func1: c.Next()
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 (0x152a5da)
(*Context).Next: c.handlersc.index
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/gin.go:389 (0x15337ef)
(*Engine).handleHTTPRequest: c.Next()
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/gin.go:351 (0x1533022)
(*Engine).ServeHTTP: engine.handleHTTPRequest(c)
/Users/foo//go1.11/src/net/http/server.go:2807 (0x1353962)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/Users/foo//go1.11/src/net/http/server.go:1895 (0x134f2db)
(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/Users/foo//go1.11/src/runtime/asm_amd64.s:1373 (0x1067e30)
goexit: BYTE $0x90 // NOP

2020/06/08 22:52:37 [Recovery] 2020/06/08 - 22:52:37 panic recovered:
GET /web/assets/common.css HTTP/1.1
Host: localhost:8080
Accept: text/css,/;q=0.1
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Connection: keep-alive
Cookie: adminer_key=dab90115b5a72da61c076b04620a4c7b; MMAUTHTOKEN=pquktfkwo3dadkb899s4md3ywr; MMUSERID=pik6q9jw4fnkpepdxtsjpgs4kw; MMCSRF=p7osxryrgiyb5e33o31dckum9y; XSRF-TOKEN=b0c56840-b1f0-44cb-ad69-f3be51402f40; JSESSIONID=F4C326EEB8276226AD426D7167293093; _r_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODYwMTAzNzUsImp0aSI6IjIxYjRjNmNkLTZlM2UtNGRmOC1iZTY3LTk0OTdlOWM3YTYyZSIsImlhdCI6MTU4NTkyMzk3NSwiaXNzIjoicm9idXN0YSIsInN1YiI6IjIxYjRjNmNkLTZlM2UtNGRmOC1iZTY3LTk0OTdlOWM3YTYyZSIsIlJvbGVzIjpudWxsLCJBdmF0YXJVUkwiOiIiLCJOYW1lIjoiIiwiTGFzdE5hbWUiOiJMaSIsIkZpcnN0TmFtZSI6IkppYW5aaG9uZyIsIlVzZXJJRCI6IjIxYjRjNmNkLTZlM2UtNGRmOC1iZTY3LTk0OTdlOWM3YTYyZSJ9.r9jBmmvKH6eOQz1yvOTpbKRSwGoS0gGeFkCJKXaaa_E; _r_user=eyJpZCI6IjVlODc0NzZjM2I5ZjZjNDQ2MjE4NWVlZSIsImVtYWlsIjoibGlqekBtYWdvbGUuY29tIiwiZmlyc3RfbmFtZSI6IkppYW5aaG9uZyIsImxhc3RfbmFtZSI6IkxpIiwic3RhdHVzIjoiYWN0aXZlIiwicHJvdmlkZXIiOiJsb2NhbCIsInVzZXJfaWQiOiIyMWI0YzZjZC02ZTNlLTRkZjgtYmU2Ny05NDk3ZTljN2E2MmUiLCJjcmVhdGVkX2F0IjoiMjAyMC0wNC0wM1QxNDoyNTo0OC40OTZaIiwidXBkYXRlZF9hdCI6IjIwMjAtMDQtMDNUMTQ6MjU6NDguNDk2WiJ9; pholcusSession=e5eda2cffc139bdda26b6c5c42f42c91; ga=GA1.1.734421552.1587189291; adminer_sid=5b56ade507a3a52bd565846646e9ebac; sidebarStatus=1; Admin-Token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOiIxNTg5NjQyNzM2IiwiaWF0IjoiMTU4OTYzOTEzNiIsInV1aWQiOiI2YTQwZTZkYS1jNmU0LTQ2YmUtYWNjMS0xM2I0NzU5OGVhNmYifQ.jn35yL6GwoAz52fFSjjFnjNsflV4aog3BeA0QBUhMzQ; connect.sid=s%3A9bb81c7f-edad-41ee-8698-da6f8791f0d7.%2BNb2GAZzZLXsLsX45Q4GM94oGtf%2BIEqVoHyk8pLBCo8; hexya-session=MTU5MTM3MDc3N3w0b1BnN0lCY3NDQ3ZIaFZ3RHVRWnNNSzQyZ0RrVHhVcGtmMmpsS2lDOTNQYXRMQ0J8f3-qMB9_asxy3y6_6uNBNfmWZTewUN7YjwgtLAHfSg=; beegosessionID=4078a417003d9e15c21c5d57db1cc122; lang=zh-CN; Remember=; ERPSession=929e5505c2af979373f3ce1d14b85e9b
Referer: http://localhost:8080/web/login
Sec-Ch-Ua: "Google Chrome";v="83"
Sec-Ch-Ua-Mobile: ?0
Sec-Fetch-Dest: style
Sec-Fetch-Mode: no-cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36

Error while creating CSS assets file
error : unable to read input: write |1: broken pipe

/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/tools/logging/logging.go:74 (0x16084a0)
(*zapLogger).Panic: panic(panicData)
/Users/foo/work/gopath/pkg/mod/github.com/hexya-addons/web@v0.1.1/controllers/assets.go:47 (0x262e47d)
createCompiledCSSFile: log.Panic("Error while creating CSS assets file", "error", err)
/Users/foo/work/gopath/pkg/mod/github.com/hexya-addons/web@v0.1.1/controllers/assets.go:61 (0x262ea63)
AssetsCommonCSS: createCompiledCSSFile(fName, commonList, bootstrapScssDir)
/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/server/routes.go:24 (0x1788599)
wrapContextFuncs.func1.1: f(&Context{Context: ctx})
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 (0x152a5da)
(*Context).Next: c.handlersc.index
/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/tools/logging/logging.go:265 (0x1609bf3)
LogForGin.func1: c.Next()
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 (0x152a5da)
(*Context).Next: c.handlersc.index
/Users/foo/work/gopath/pkg/mod/github.com/gin-contrib/sessions@v0.0.1/sessions.go:65 (0x16e1c4c)
Sessions.func1: c.Next()
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 (0x152a5da)
(*Context).Next: c.handlersc.index
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/recovery.go:83 (0x153be7f)
RecoveryWithWriter.func1: c.Next()
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 (0x152a5da)
(*Context).Next: c.handlersc.index
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/gin.go:389 (0x15337ef)
(*Engine).handleHTTPRequest: c.Next()
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/gin.go:351 (0x1533022)
(*Engine).ServeHTTP: engine.handleHTTPRequest(c)
/Users/foo//go1.11/src/net/http/server.go:2807 (0x1353962)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/Users/foo//go1.11/src/net/http/server.go:1895 (0x134f2db)
(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/Users/foo//go1.11/src/runtime/asm_amd64.s:1373 (0x1067e30)
goexit: BYTE $0x90 // NOP

2020-06-08T22:52:37.138+0800 INFO logging/logging.go:98 {"module": "server", "status": 304, "method": "GET", "path": "/static/web/src/img/hexya_logo_tiny.png", "ip": "::1", "latency": "274.582µs"}
2020-06-08T22:52:37.332+0800 INFO logging/logging.go:98 {"module": "server", "status": 200, "method": "GET", "path": "/web/binary/company_logo", "ip": "::1", "latency": "196.500791ms"}

@npiganeau
Copy link
Member

Hexya tries to create the CSS bundle in the temp dir given by os.TempDir() which defaults to $TMPDIR or "/tmp" if $TMPDIR is not set.

Does the directory exist and do you have write access on it ?

@goodforever
Copy link
Author

goodforever commented Jun 17, 2020

After set $TMPDIR, when visit localhost:8080 , _web_assets_common.css and _web_assets_frontend.css two files are created in $TMPDIR, but they are empty .

log

Error while creating CSS assets file
error : unable to read input: write |1: broken pipe

/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/tools/logging/logging.go:74 (0x16084a0)
(*zapLogger).Panic: panic(panicData)
/Users/foo/work/gopath/pkg/mod/github.com/hexya-addons/web@v0.1.1/controllers/assets.go:47 (0x262e47d)
createCompiledCSSFile: log.Panic("Error while creating CSS assets file", "error", err)
/Users/foo/work/gopath/pkg/mod/github.com/hexya-addons/web@v0.1.1/controllers/assets.go:89 (0x262f3dd)
AssetsFrontendCSS: createCompiledCSSFile(fName, frontendList, bootstrapScssDir)
/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/server/routes.go:24 (0x1788599)
wrapContextFuncs.func1.1: f(&Context{Context: ctx})
/Users/foo/work/gopath/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 (0x152a5da)
(*Context).Next: c.handlersc.index
/Users/foo/work/gopath/pkg/mod/github.com/hexya-erp/hexya@v0.1.1/src/tools/logging/logging.go:265 (0x1609bf3)
LogForGin.func1: c.Next()

..............

@npiganeau
Copy link
Member

Strange. The sass command doesn't return anything.

You should have a res directory that has been generated by hexya generate.
Inside this dir, you should find a static dir and inside the latter a symlink to web with assets files in it. Is this the case ?

@goodforever
Copy link
Author

goodforever commented Jun 23, 2020

Yes , res has data,demo,i18n,resources,static, five directories.
There are web and base two directories in static directory. The web has img,lib,pdf,src,tests directories.

@ibralsmn
Copy link

any solution for that it's a big issue

@npiganeau
Copy link
Member

It seems to work only with dart-sass (https://github.com/sass/dart-sass/releases) and not ruby sass

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

3 participants