Trying to package: Webpack never ends

Hi, I’m trying to build a custom grafana for a raspberry pi. I’ve forked the source code.

I’m doing:

go run build.go -goarch armv7 -cc arm-linux-gnueabihf-gcc build
yarn install --pure-lockfile --no-progress
go run build.go build-frontend

And building front end just shows

Running "exec:webpack" (exec) task
Starting type checking service...
Using 1 worker with 2048MB memory limit

But it never ends.

Same result if I ran directly

 go run build.go -goos linux -pkg-arch armv7 package-only

or

go run build.go -goos linux -pkg-arch armv7 pkg-deb

I tried erasing the node_modules folder and retrying again with no luck of any of those three methods.

Grafana version: 6.5.3
Node version: 10.18.1

PS: If I just try to develop and run grafana with yarn install --pure-lockfile and make run, it works on my machine apparently with no issues.

Building on a Pi I had problems with phantomjs, have those been sorted? This prevented me building the package on a pi though I was able to build and run locally by removing the phantomjs-prebuilt line from package.json.

I don’t understand the full subtleties of what I am doing, but when I build a package on Ubuntu I just run

go run build.go build package

which works on Ubuntu, but as I said not on a pi due, if I remember correctly, to the phantomjs problem.

Hi, thanks for your answer. Note that I’m crosscompiling, not compiling directly in the Pi.

PS: Not sure about what you said, but I’ll check if phantomjs is an issue for the building process.

Oh yes. I tried that briefly but didn’t manage it so build on the pi instead. It takes a long, long time on a Pi 3, not so bad on a 4. You can run the files from a 4 build on a 3.

Found a hint looking at the grafana issues

So the process I end up using for generating a deb package for the pi was (crosscompiling):

go run build.go -goarch armv7 -cc arm-linux-gnueabihf-gcc build
yarn install --pure-lockfile --no-progress
yarn dev
go run build.go -goos linux -pkg-arch armv7 -skipRpm package-only

If that works for me too I shall be eternally grateful.
Perhaps something could be added to the wiki somewhere.
Thanks