alanshaw / alanshaw/markdown-pdf

Error: spawn EPERM and Error: spawn ENOENT

Open
#122 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.9k
Forks
253
PR merge metrics
No merged PRs in 30d

Description

I'm trying to convert a markdown file to pdf with the code below of `index.js` and I'm getting these errors after run `node index.js`.

The first error below 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?

#### index.js
```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. (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 pipe.
^

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)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.