vbauer / manet

Website screenshot service powered by Node.js, SlimerJS and PhantomJS
MIT License
576 stars 102 forks source link

Process error: `/usr/bin/env: ‘node\r’ #93

Closed anandchakru closed 6 years ago

anandchakru commented 6 years ago

Started manet - no issues

$ manet
2018-01-07T04:39:27.402Z - info: Initialize FS watchdog: directory: /tmp, timeout: 3600000ms
2018-01-07T04:39:27.412Z - info: Manet server started on 0.0.0.0:8891

In another terminal

$ curl http://localhost:8891/?url=google.com&format=png > google.png

Got the following error:

2018-01-07T04:39:46.637Z - info: Capture site screenshot: "google.com"
2018-01-07T04:39:46.649Z - error: Process error: /usr/bin/env: ‘node\r: No such file or directory`

I'm on Ubuntu 16

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:    16.04
Codename:   xenial
anandchakru commented 6 years ago

It was actually an issue with phantomjs. resolved it by running

dos2unix .npm-global/lib/node_modules/phantomjs2/bin/phantomjs