Make package fails on Mac

I have followed the developer instructions, but, I’m getting a “error Command failed with exit code 2.” on performing “make package”. I can run “make build-osx” without error. I am running on latest Sierra 10.12.3. I have over 3GB memory free when running the command (8GB total).

Below is the error:

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (250 kB).
This can impact web performance.
Assets:
files/a6c8345ce432f736c314ba6c1941e1b6.png (425 kB)
files/01355a63c3fdce2be4aef385000d7583.png (258 kB)
files/8a8411b1a1d7f441aeb3e5dedc1cd6f7.png (261 kB)
i18n/fr.c8ace4a62ce633369fa2399656ded5df.json (251 kB)
i18n/ja.4945b4e543117db50530c0a4b0a9f672.json (275 kB)
i18n/ru.adbd02b09d589b1b2f6aac282519f78f.json (317 kB)
0.3f0f920806196ce5492c.js (362 kB)
2.67f38ec409df279d2fc1.js (1.34 MB)
3.589bcd76b165045148d2.js (609 kB)
6.202d2b9891259d6bfeea.js (1.43 MB)
7.e331d551e6111e735694.js (1.9 MB)
8.1e3a405c1325042b6b5b.js (1.28 MB)
9.d79abc7b8a7e91a4a0d2.js (838 kB)
10.43778c9cae0452143189.js (785 kB)
11.cb69c9772341b4a5220b.js (256 kB)
12.4bdae6405fe81c2aaeb0.js (253 kB)
13.0140f5822f22e7d0ef04.js (252 kB)
14.e1da0a6d5aa420d30ac7.js (378 kB)
19.c517f456ba30816bca6a.js (620 kB)
20.016513a637483f0557f2.js (614 kB)
21.e1fc9944b271c38ad3ee.js (602 kB)
22.f79491997af464681248.js (537 kB)
23.4759266d18775aa1c4c4.js (539 kB)
24.93074f355f10ccbe9ebd.js (545 kB)
25.dc3a685a0950aedd4d07.js (538 kB)
26.1575c92fa5fdfa2847ea.js (538 kB)
27.9c3c3266e6b1969b72c1.js (539 kB)
28.e50f35920bba970f8f2d.js (537 kB)
32.597662341c6c96ca4269.js (342 kB)
53.e7a3b8852be993ce7647.js (686 kB)
main.7368b644248700685c4a.js (5.26 MB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (250 kB). This can impact web performance.
Entrypoints:
main (5.26 MB)
main.7368b644248700685c4a.js

ERROR in main.7368b644248700685c4a.js from UglifyJs
RangeError: Maximum call stack size exceeded
at eval (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3216:27)
at Object.before (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :5493:9)
at AST_Node.eval [as transform] (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3082:35)
at eval (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3217:31)
at Object.before (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :5493:9)
at AST_Node.eval [as transform] (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3082:35)
at eval (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3217:31)
at Object.before (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :5493:9)
at AST_Node.eval [as transform] (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3082:35)
at eval (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3217:31)
at Object.before (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :5493:9)
at AST_Node.eval [as transform] (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3082:35)
at eval (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3217:31)
at Object.before (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :5493:9)
at AST_Node.eval [as transform] (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3082:35)
at eval (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3217:31)
at Object.before (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :5493:9)
at AST_Node.eval [as transform] (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3082:35)
at eval (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3217:31)
at Object.before (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :5493:9)
at AST_Node.eval [as transform] (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3082:35)
at eval (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3217:31)
at Object.before (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :5493:9)
at AST_Node.eval [as transform] (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3082:35)
at eval (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3217:31)
at Object.before (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :5493:9)
at AST_Node.eval [as transform] (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3082:35)
at eval (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3217:31)
at Object.before (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :5493:9)
at AST_Node.eval [as transform] (eval at (/Users/davidwelch/go/src/github.com/mattermost/platform/webapp/node_modules/uglify-js/tools/node.js:1:0), :3082:35)
Child html-webpack-plugin for “root.html”:
PublicPath: /static/
Entrypoint undefined = root.html
chunk {0} root.html 4.23 kB [entry] [rendered]
> [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 3.17 kB {0} [depth 0] [built]
[1] ./images/favicon/apple-touch-icon-57x57.png 88 bytes {0} [depth 1] [built]
cjs require ./images/favicon/apple-touch-icon-57x57.png [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 1:692-746
[2] ./images/favicon/apple-touch-icon-60x60.png 88 bytes {0} [depth 1] [built]
cjs require ./images/favicon/apple-touch-icon-60x60.png [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 1:800-854
[3] ./images/favicon/apple-touch-icon-72x72.png 88 bytes {0} [depth 1] [built]
cjs require ./images/favicon/apple-touch-icon-72x72.png [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 1:908-962
[4] ./images/favicon/apple-touch-icon-76x76.png 88 bytes {0} [depth 1] [built]
cjs require ./images/favicon/apple-touch-icon-76x76.png [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 1:1016-1070
[5] ./images/favicon/apple-touch-icon-144x144.png 88 bytes {0} [depth 1] [built]
cjs require ./images/favicon/apple-touch-icon-144x144.png [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 1:1126-1182
[6] ./images/favicon/apple-touch-icon-120x120.png 88 bytes {0} [depth 1] [built]
cjs require ./images/favicon/apple-touch-icon-120x120.png [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 1:1238-1294
[7] ./images/favicon/apple-touch-icon-152x152.png 88 bytes {0} [depth 1] [built]
cjs require ./images/favicon/apple-touch-icon-152x152.png [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 1:1350-1406
[8] ./images/favicon/favicon-16x16.png 88 bytes {0} [depth 1] [built]
cjs require ./images/favicon/favicon-16x16.png [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 1:1463-1508
[9] ./images/favicon/favicon-32x32.png 88 bytes {0} [depth 1] [built]
cjs require ./images/favicon/favicon-32x32.png [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 1:1565-1610
[10] ./images/favicon/favicon-96x96.png 88 bytes {0} [depth 1] [built]
cjs require ./images/favicon/favicon-96x96.png [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 1:1667-1712
[11] ./images/favicon/android-chrome-192x192.png 88 bytes {0} [depth 1] [built]
cjs require ./images/favicon/android-chrome-192x192.png [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 1:1771-1825
[12] ./config/manifest.json 89 bytes {0} [depth 1] [built]
cjs require ./config/manifest.json [0] ./node_modules/html-webpack-plugin/lib/loader.js!./root.html 1:1859-1892
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
make[1]: *** [build] Error 1
make: *** [build-client] Error 2

Hi @davidbwelch,

Thanks for your feedback,

Do the suggestions in this similar issue help?