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.

bug: SyntaxError Unexpected token function

See original GitHub issue

Context:

  • version (md-to-pdf -v): 2.7.1
  • platform (Unix, macOS, Windows): Debian 8.11 64-bit
  • node version: 6.17.1

Describe the bug: (A clear and concise description of what the bug is. Feel free to include screenshots.)

Dear Support Team,

After installed successfully “md-to-pdf” on Debian 8.11, I’ve tried to convert my first markdown file in pdf. Unfortunately, I encountered this error message :

md-top-pdf - SyntaxError Unexpected token function

Thanks for your help.

Regards,

Jean Salmon

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
salmonjeancommented, Jul 30, 2019

Hi Simon ! Hi Jakub ! It works! 😃

image

Thank you for your help to both of you

2reactions
jaknascommented, Jul 30, 2019

Looks like md-to-pdf requires “node”: “>= 8.3.0”. https://github.com/simonhaenisch/md-to-pdf/blob/46d2fe54df7d0f511c0a7370e2143f08a72a734d/package.json#L18

Have you tried updating your node.js version?

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: Unexpected token - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >
SyntaxError: Unexpected token function - Async Await Nodejs
I have no clue why, the terminal throws up an error when I try to execute the node code. helloz.js (async function testingAsyncAwait()...
Read more >
JavaScript Error Handling: Unexpected Token - GeeksforGeeks
Not follow them throws an error.An unexpected token occurs if JavaScript code has a missing or extra character { like, ) + –...
Read more >
Have a JavaScript Unexpected Token Error? Check Your Syntax
The Unexpected Token error is a specific type of SyntaxError object. ... var printError = function(error, explicit) {
Read more >
SyntaxError: Unexpected token function · Issue #20672 - GitHub
i think it is caused by the babel,not node. All reactions.
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