Install error during "yarn test" : Could not include file "../build/cover-header"

Hi, I need your help,

An error occurs when trying to install HedgeDoc 1.7.2 on a Debian 9 server.
I followed the “Manual Installation” instructions : https://docs.hedgedoc.org/setup/manual-setup/

The error occurs during the “yarn start” test, server starts fine but :

  • server return a 500 error when client do “wget http://localhost:3000
  • see the the full server log bellow. Server error message is : Error: Could not find the include file “…/build/cover-header”

I’m not familiar with Node.js stuff and have no idea how to solve this problem.

How can I fix this ?

# yarn start
yarn run v1.22.5
$ sequelize db:migrate && node app.js

Sequelize CLI [Node: 14.15.4, CLI: 5.5.1, ORM: 5.22.3]

Parsed url postgres://hedgedoc:*****@localhost:5432/hedgedoc
No migrations were executed, database schema was already up to date.
2021-02-05T07:19:03.399Z warn: 	Session secret not set. Using random generated one. Please set `sessionSecret` in your config.json file. All users will be logged out.
2021-02-05T07:19:03.680Z debug: 	dmp worker process started
[... SQL queries]
2021-02-05T07:19:04.016Z info: 	HTTP Server listening at 0.0.0.0:3000
Error: Could not find the include file "../build/cover-header"
    at getIncludePath (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:165:13)
    at includeSource (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:309:17)
    at /opt/hedgedoc/node_modules/ejs/lib/ejs.js:745:26
    at Array.forEach (<anonymous>)
    at Template.generateSource (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:721:15)
    at includeSource (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:313:9)
    at /opt/hedgedoc/node_modules/ejs/lib/ejs.js:745:26
    at Array.forEach (<anonymous>)
    at Template.generateSource (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:721:15)
    at Template.compile (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:574:12)
    at Object.compile (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:392:16)
    at handleCache (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:215:18)
    at tryHandleCache (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:254:16)
    at View.exports.renderFile [as engine] (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:485:10)
    at View.render (/opt/hedgedoc/node_modules/express/lib/view.js:135:8)
    at tryRender (/opt/hedgedoc/node_modules/express/lib/application.js:640:10)
    at Function.render (/opt/hedgedoc/node_modules/express/lib/application.js:592:3)
    at ServerResponse.render (/opt/hedgedoc/node_modules/express/lib/response.js:1012:7)
    at showIndex (/opt/hedgedoc/lib/response.js:47:9)
    at Layer.handle [as handle_request] (/opt/hedgedoc/node_modules/express/lib/router/layer.js:95:5)
    at next (/opt/hedgedoc/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/opt/hedgedoc/node_modules/express/lib/router/route.js:112:3)
[... SQL queries]

Hi, welcome to the community :slight_smile:

Did you use the pre-built release tarball? If not, make sure that you ran yarn run build before running yarn start.

Let us know if that solved the problem.

Damn ! That’s it !

My bad, I misread the instructions.

It’s OK now.

Thank you for your response.