To provide a little more clarification of the errors I am receiving, I’ll summarize as much as I can below:
#$> sudo -u git -H bundler exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production
created app.js in /path/to/gitlab/assets/javascripts/locale/bg
...
All Files created, make sure they are being added to your assets.
...
/path/to/gitlab/node_modules/.bin/webpack --config /path/to/gitlab/config/webpack.config.js -- bail
Hash: 5124db186849b14881b4
Version: webpack 3.5.5
Time: 46224 ms
253 assets
[./promethus_metrics/index.js] ./promethus_metrics/index.js 197 bytes {promethus_metrics} [built]
...
[multi vendor/u2f] multi vendor/u2f 28 bytes {u2f} [built]
+ 862 hidden modules
``
ERROR in ./render_mermaid.js
Module build failed: Syntax Error: 'import' and 'export' may only appear at the top level (20:2)
if (!$els.length) return;
> import( 'blackst0ne-mermaid').then((mermaid => {
^
mermaid.initilize ({
mermaid : {
@ ./render_gfm.js 2:0-45
@ ./main.js
ERROR in ./filtered_search_dropdown_emoji.js
...
...
...
rake aborted!
Command failed with status (2): [...]
/path/to/gitlab/vendor/bundle/ruby/2.4.0/gems/webpack-rails-0.9.10/lib/tasks/webpack.rake:17: in
'block (2 levels) in <top (require)>'
...
Tasks: TOP => gitlab:assets:compile => webpack:compile
The actual error message is rather long, stating more Syntax Errors in other files.
Here is a list of the support program versions I currently have installed:
ruby :: 2.4.3p205
gem :: 2.6.14
rake :: 12.3.0
yarn :: 1.3.2
go :: 1.9.2
bundler :: 1.16.1
node js :: 9.5.0 (I’ve also tried 7.10.1 and 8.9.4)
I used the Gemfile, Gemfile.lock, and yarn.lock files as a guideline for downloading the gem and js dependencies. So I do not believe those are an issue; however, webpack (v.3.5.5) does seem to be producing the error, so I wonder if that has something to do with it.
If I cannot compile the assets myself, is there a way to download pre-compiled assets to install instead?
Once again, any help would be appreciated. Thanks.
Walter