Module build failed (from ./node_modules/handlebars-loader/index.js):

Nextcloud version (eg, 20.0.5): 24.0.0 dev (I see this in version.php, the value of OC_VersionString variable)
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 8.0.17

The issue you are facing:

As said here, I’m trying to run this command:

make build-js

But I get the following error in the terminal:

ERROR in ./core/src/OC/contactsmenu/list.handlebars
Module build failed (from ./node_modules/handlebars-loader/index.js):
Error: Parse error on line 13:
...}</a></div>{{/if}}
---------------------^
Expecting 'CONTENT', 'COMMENT', 'OPEN_BLOCK', 'OPEN_INVERSE', 'OPEN_ENDBLOCK', 'OPEN', 'OPEN_UNESCAPED', 'OPEN_PARTIAL', got 'EOF'
    at Parser.parseError (/home/projects/files/node_modules/handlebars-loader/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:107:11)
    at Parser.parse (/home/projects/files/node_modules/handlebars-loader/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:159:22)
    at HandlebarsEnvironment.parse (/home/projects/files/node_modules/handlebars-loader/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js:12:17)
    at precompile (/home/projects/files/node_modules/handlebars-loader/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:435:17)
    at HandlebarsEnvironment.hb.precompile (/home/projects/files/node_modules/handlebars-loader/node_modules/handlebars/dist/cjs/handlebars.js:22:12)
    at generateTemplateExport (/home/projects/files/node_modules/handlebars-loader/index.js:66:80)
    at Object.module.exports (/home/projects/files/node_modules/handlebars-loader/index.js:36:10)
 @ ./core/src/OC/contactsmenu.js 244:10-51
 @ ./core/src/OC/index.js 36:0-42 98:16-28
 @ ./core/src/login.js 27:0-28

webpack 5.70.0 compiled with 1 error and 1 warning in 51616 ms
make: *** [Makefile:14: build-js] Error 1

I tried running make command both in docker host and docker container but got the same error.

After running this command, I now see that website.com/apps/dashboard does not load.

Is this the first time you’ve seen this error? Yes

Steps to replicate it:

  1. cd /home/projects/files
  2. make build-js

The output of your Nextcloud log in Admin > Logging:

The URL https://website.com/apps/dashboard does not load to have any output in web.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'debug' => true,
  'instanceid' => 'oce6illk00p9',
  'passwordsalt' => '2WM2utukJQ02TMMdVYNknImgVAaHba',
  'secret' => 'HE59/8B8t2lJ+ThFv6QkPtQ98O9MCRAF5+121T+NEw+xS8EG',
  'trusted_domains' => 
  array (
    0 => 'pz2.ir',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '24.0.0.5',
  'overwrite.cli.url' => 'https://website.com/',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'pass',
  'installed' => true,
  // # logging
  // "log_type" => "file",
  // "logfile" => "/var/log/nextcloud",
  // "loglevel" => 3,
  // "logdateformat" => "F d, Y H:i:s",
  );

The output of your Apache/nginx/system log in /var/log/____:

There are no logs in error.log

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

There are no logs after I did activated log section in config.php.

It’s solved.