I'm trying to convert a markdown to pdf using the npm package markdown-pdf with the code below of index.js
and I'm getting these errors after run node index.js
.
The first error I got is on my Windows 10 Host Machine, and the second one is on my Ubuntu Guest VirtualBox VM.
Any idea of how to solve this? Anything related with phantomjs package?
index.js
var markdownpdf = require("markdown-pdf"),
fs = require("fs")
markdownpdf().from("./README.md").to("./curriculo.pdf", function() {
console.log("Converted to PDF successfully!")
})
Terminal Output Error - Windows Host VM
internal/child_process.js:319
throw errnoException(err, 'spawn');
^
Error: spawn EPERM
at exports._errnoException (util.js:1018:11)
at ChildProcess.spawn (internal/child_process.js:319:11)
at exports.spawn (child_process.js:378:9)
at Object.exports.execFile (child_process.js:143:15)
at WriteStream.<anonymous>
(C:\Users\User\Documents\localdev\curriculo\node_modules\markdown-pdf\index.js:117:22)
at emitNone (events.js:91:20)
at WriteStream.emit (events.js:185:7)
at finishMaybe (_stream_writable.js:512:14)
at afterWrite (_stream_writable.js:386:3)
at onwrite (_stream_writable.js:376:7)
Terminal Output Error - Ubuntu Guest VM
stream.js:74
throw er; // Unhandled stream error in penter code hereipe.
^
Error: spawn /media/sf_localdev/curriculo/node_modules/phantomjs-prebuilt/lib/phantom\bin\phantomjs.exe ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
via André Ferreira
No comments:
Post a Comment