Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

isBoard already declared #148

Closed
shiuido opened this issue May 30, 2020 · 2 comments
Closed

isBoard already declared #148

shiuido opened this issue May 30, 2020 · 2 comments

Comments

@shiuido
Copy link

shiuido commented May 30, 2020

I have completed installation as per instructions on the front page of the project. However I can see there are errors in both chan-error.log and build-worker-error.log. Both have the same syntax error relating to the isBoard variable, which I believe lives in head.pug. I suspect this isn't a problem with head.pug, but is possibly a problem with my environment, but I'm at a loss.

Here you can see an exert of the errors from build-worker-error.log:

You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
SyntaxError: Identifier 'isBoard' has already been declared
    at Function (<anonymous>)
    at wrap (/home/admin/jschan/node_modules/pug-runtime/wrap.js:6:10)
    at Object.exports.compile (/home/admin/jschan/node_modules/pug/lib/index.js:287:7)
    at handleTemplateCache (/home/admin/jschan/node_modules/pug/lib/index.js:240:25)
    at Object.exports.renderFile (/home/admin/jschan/node_modules/pug/lib/index.js:452:10)
    at module.exports (/home/admin/jschan/helpers/render.js:14:19)
    at Object.buildHomepage (/home/admin/jschan/helpers/tasks.js:203:22)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
2020-05-30 08:00:00.175: SyntaxError: Identifier 'isBoard' has already been declared
    at Function (<anonymous>)
    at wrap (/home/admin/jschan/node_modules/pug-runtime/wrap.js:6:10)
    at Object.exports.compile (/home/admin/jschan/node_modules/pug/lib/index.js:287:7)
    at handleTemplateCache (/home/admin/jschan/node_modules/pug/lib/index.js:240:25)
    at Object.exports.renderFile (/home/admin/jschan/node_modules/pug/lib/index.js:452:10)
    at module.exports (/home/admin/jschan/helpers/render.js:14:19)
    at Object.buildHomepage (/home/admin/jschan/helpers/tasks.js:203:22)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) Promise {
  <rejected> SyntaxError: Identifier 'isBoard' has already been declared
      at Function (<anonymous>)
      at wrap (/home/admin/jschan/node_modules/pug-runtime/wrap.js:6:10)
      at Object.exports.compile (/home/admin/jschan/node_modules/pug/lib/index.js:287:7)
      at handleTemplateCache (/home/admin/jschan/node_modules/pug/lib/index.js:240:25)
      at Object.exports.renderFile (/home/admin/jschan/node_modules/pug/lib/index.js:452:10)
      at module.exports (/home/admin/jschan/helpers/render.js:14:19)
      at Object.buildHomepage (/home/admin/jschan/helpers/tasks.js:203:22)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
}

Exert from chan-error.log

1|chan  | 2020-05-30 08:20:22.264: SyntaxError: Identifier 'isBoard' has already been declared
1|chan  |     at Function (<anonymous>)
1|chan  |     at wrap (/home/admin/jschan/node_modules/pug-runtime/wrap.js:6:10)
1|chan  |     at Object.exports.compile (/home/admin/jschan/node_modules/pug/lib/index.js:287:7)
1|chan  |     at handleTemplateCache (/home/admin/jschan/node_modules/pug/lib/index.js:240:25)
1|chan  |     at Object.exports.renderFile (/home/admin/jschan/node_modules/pug/lib/index.js:452:10)
1|chan  |     at Object.exports.renderFile (/home/admin/jschan/node_modules/pug/lib/index.js:442:21)
1|chan  |     at View.exports.__express [as engine] (/home/admin/jschan/node_modules/pug/lib/index.js:491:11)
1|chan  |     at View.render (/home/admin/jschan/node_modules/express/lib/view.js:135:8)
1|chan  |     at tryRender (/home/admin/jschan/node_modules/express/lib/application.js:640:10)
1|chan  |     at Function.render (/home/admin/jschan/node_modules/express/lib/application.js:592:
     at ServerResponse.render (/home/admin/jschan/node_modules/express/lib/response.js:1012:7)
1|chan  |     at module.exports (/home/admin/jschan/helpers/dynamic.js:11:14)
1|chan  |     at /home/admin/jschan/server.js:113:10
1|chan  |     at Layer.handle_error (/home/admin/jschan/node_modules/express/lib/router/layer.js:71:5)
1|chan  |     at trim_prefix (/home/admin/jschan/node_modules/express/lib/router/index.js:315:13)
1|chan  |     at /home/admin/jschan/node_modules/express/lib/router/index.js:284:7
1|chan  | 2020-05-30 08:20:24.662: SyntaxError: Identifier 'isBoard' has already been declared
1|chan  |     at Function (<anonymous>)
1|chan  |     at wrap (/home/admin/jschan/node_modules/pug-runtime/wrap.js:6:10)
1|chan  |     at Object.exports.compile (/home/admin/jschan/node_modules/pug/lib/index.js:287:7)
1|chan  |     at handleTemplateCache (/home/admin/jschan/node_modules/pug/lib/index.js:240:25)
1|chan  |     at Object.exports.renderFile (/home/admin/jschan/node_modules/pug/lib/index.js:452:10)
1|chan  |     at module.exports (/home/admin/jschan/helpers/render.js:14:19)
1|chan  |     at buildHomepage (/home/admin/jschan/helpers/tasks.js:203:22)
1|chan  |     at processTicksAndRejections (internal/process/task_queues.js:97:5)
1|chan  |     at async module.exports (/home/admin/jschan/models/pages/home.js:9:10)
1|chan  | 2020-05-30 08:20:24.703: SyntaxError: Identifier 'isBoard' has already been declared
1|chan  |     at Function (<anonymous>)
1|chan  |     at wrap (/home/admin/jschan/node_modules/pug-runtime/wrap.js:6:10)
1|chan  |     at Object.exports.compile (/home/admin/jschan/node_modules/pug/lib/index.js:287:7)
1|chan  |     at handleTemplateCache (/home/admin/jschan/node_modules/pug/lib/index.js:240:25)
1|chan  |     at Object.exports.renderFile (/home/admin/jschan/node_modules/pug/lib/index.js:452:10)
1|chan  |     at Object.exports.renderFile (/home/admin/jschan/node_modules/pug/lib/index.js:442:21)
1|chan  |     at View.exports.__express [as engine] (/home/admin/jschan/node_modules/pug/lib/index.js:491:11)
1|chan  |     at View.render (/home/admin/jschan/node_modules/express/lib/view.js:135:8)
1|chan  |     at tryRender (/home/admin/jschan/node_modules/express/lib/application.js:640:10)
1|chan  |     at Function.render (/home/admin/jschan/node_modules/express/lib/application.js:592:3)
1|chan  |     at ServerResponse.render (/home/admin/jschan/node_modules/express/lib/response.js:1012:7)
1|chan  |     at module.exports (/home/admin/jschan/helpers/dynamic.js:11:14)
1|chan  |     at /home/admin/jschan/server.js:113:10
1|chan  |     at Layer.handle_error (/home/admin/jschan/node_modules/express/lib/router/layer.js:71:5)
1|chan  |     at trim_prefix (/home/admin/jschan/node_modules/express/lib/router/index.js:315:13)
1|chan  |     at /home/admin/jschan/node_modules/express/lib/router/index.js:284:7
@shiuido
Copy link
Author

shiuido commented May 30, 2020

To reproduce: follow the Setup instructions from a fresh install of Debian 9.5 (Linux 4.9.0-8-amd64).

fatchan added a commit that referenced this issue May 30, 2020
@fatchan
Copy link
Owner

fatchan commented May 30, 2020

This was caused by a regression in a dependency, see similar issue: pugjs/pug#3260
I updated package-lock.json on dev branch. Pull and run npm install again and it should be fixed.

@fatchan fatchan closed this as completed May 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants