question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught SyntaxError: Missing initializer in const declaration

See original GitHub issue

Expected Behavior

Working

Current Behavior

After clinic as run the html report is broken with error. 14030.clinic-doctor.html:7476 Uncaught SyntaxError: Missing initializer in const declaration

This error happen with doctor and with bubbleproof.

Screenshot 2020-06-05 14 06 14

Steps to Reproduce (for bugs)

  1. clinic doctor – node yourscript
  2. ctrl + c
  3. open the report in chrome
  4. error in console

N.B: also broken on your website 😕

Sample upload

This has nothing to do with report, it’s working once all js errors are fixed

Environment

  • Clinic.js version: 6.0.0
  • Node.js version:12.16.1
  • Browser name and version: Chrome Version 83.0.4103.61 (Official Build) (64-bit)
  • Operating system and version: osx catalina 10.15.5

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
javaHashbrowncommented, Jun 5, 2020

@bodinsamuel Came across the same issue and I found a temporary fix.

I searched all scripts inside the last script tag in the html, found const EventEmitter,, and replaced them all with const EventEmitter=require('events'),. After that everything was fine.

I guess this is a babel issue but I cannot pinpoint where the problem is. Anyways, hope this helps.

2reactions
jasnellcommented, Jun 7, 2020

Should have a fix in by Monday end of day.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: missing = in const declaration - JavaScript | MDN
The JavaScript exception "missing = in const declaration" occurs when a const declaration was not given a value in the same statement (like ......
Read more >
Missing initializer in const declaration in node js - Stack Overflow
In javascript, you can't assign value to 'const' later after it's declaration. You're bound to assign the value to const on the declaration...
Read more >
Missing initializer in const declaration' mean in JavaScript?
Somewhat surprisingly for a syntax error, it means exactly what it says: you tried to declare a const variable, and you neglected to...
Read more >
JavaScript SyntaxError - Missing = in const declaration
This JavaScript exception missing = in const declaration occurs if a const is declared and value is not provided(like const ABC_DEF;). Need to ......
Read more >
SyntaxError: missing = in const declaration - JavaScript
The JavaScript exception "missing = in const declaration" occurs when a const declaration was not given a value in the same statement (like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found