karuppiah7890 / easy-pdf-merge

An npm module to merge PDFs. https://www.npmjs.com/package/easy-pdf-merge [ CURRENTLY NOT MAINTAINED ]
85 stars 37 forks source link

gives error when trying to run node app. #1

Closed govind-sinh closed 7 years ago

govind-sinh commented 8 years ago

SyntaxError: Unexpected token ILLEGAL at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17)

karuppiah7890 commented 8 years ago

Can you elaborate the issue ? What exactly did you execute ? And easy-pdf-merge is a npm module, not an app. So, what did you execute ?

0ruben commented 8 years ago

You need to upgrade your NODEJS version

karuppiah7890 commented 8 years ago

@0ruben Yeah, I guess you are right. Errors occur because template literals are not supported until v4.3.2

node support

And for PaaS purposes I will update the engines key in package.json to the 6.9.1 LTS version

Tin-Nguyen commented 7 years ago

Hi all,

Any updates from the issue. I got the same issue on my server (works well on local) /node_modules/easy-pdf-merge/lib/PDFMerger.js:32 norm_src.push("${src[i]}"); ^ SyntaxError: Unexpected token ILLEGAL at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/srv/unified/rendering/node_modules/easy-pdf-merge/index.js:1:80) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) npm ERR! weird error 8 npm ERR! not ok code 0

karuppiah7890 commented 7 years ago

@Tin-Nguyen Use the latest stable version of NodeJS and you should be fine :smile:

Tin-Nguyen commented 7 years ago

just concerning why the lib works well locally has the same nodeJS version 5.7.1 as the server.

karuppiah7890 commented 7 years ago

Oh. Can you recheck ? Because I don't see any other error in the line from your Syntax Error Stack Trace

Tin-Nguyen commented 7 years ago

Yeah, I figured out the root cause. Fixed it. Thanks @karuppiah7890

karuppiah7890 commented 7 years ago

@Tin-Nguyen What was the root cause ?