Request for assistance: Mattermost WebApp on Ubuntu Server 18.04 on Raspberry Pi Build Error


When running Ubuntu 18.04 on Raspberry Pi 3B+ and using the command make package to create the package for the mattermost web app (To allow for full customization), it gives an error in the code and aborts.

Steps to reproduce

1: cd /mattermost-webapp/
2: make package (Note: I am running all commands as the root account, from the command line)

Expected behavior

I was expecting that the build would have run and gone through and created the package as the mattermost wiki said that it should, but instead it errored out and failed, even after I completely updated and re-installed everything.

Observed behavior (that appears unintentional)

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm@6.14.8
3 info using node@v8.10.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle mattermost-webapp@0.0.1~prebuild: mattermost-webapp@0.0.1
6 info lifecycle mattermost-webapp@0.0.1~build: mattermost-webapp@0.0.1
7 verbose lifecycle mattermost-webapp@0.0.1~build: unsafe-perm in lifecycle true
8 verbose lifecycle mattermost-webapp@0.0.1~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/root/mattermost-webapp/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle mattermost-webapp@0.0.1~build: CWD: /root/mattermost-webapp
10 silly lifecycle mattermost-webapp@0.0.1~build: Args: [ '-c',
10 silly lifecycle   'cross-env NODE_ENV=production webpack --display-error-details --verbose' ]
11 info lifecycle mattermost-webapp@0.0.1~build: Failed to exec build script
12 verbose stack Error: mattermost-webapp@0.0.1 build: `cross-env NODE_ENV=production webpack --display-error-details --verbose`
12 verbose stack spawn ENOENT
12 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack     at emitTwo (events.js:126:13)
12 verbose stack     at ChildProcess.emit (events.js:214:7)
12 verbose stack     at maybeClose (internal/child_process.js:925:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
13 verbose pkgid mattermost-webapp@0.0.1
14 verbose cwd /root/mattermost-webapp
15 verbose Linux 5.4.0-1018-raspi
16 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "build"
17 verbose node v8.10.0
18 verbose npm  v6.14.8
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error mattermost-webapp@0.0.1 build: `cross-env NODE_ENV=production webpack --display-error-details --verbose`
23 error spawn ENOENT
24 error Failed at the mattermost-webapp@0.0.1 build script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

Are there any suggestions or known fixes/bypasses that I am missing to allow me to complete the build? I already am running mattermost from the same server and it is working just fine. If additional details are needed, I can provide them, just let me know. Any and all help would be greatly appreciated!

This looks like an issue with the installed node_modules dependencies and not finding the cross-env binary. I found that /might/ be related. I wonder if that could help?

1 Like

I’ll look into it and let you know, thank you for the suggestion, I appreciate it a lot!