Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: spawn EACCES #54

Closed
hced opened this issue Feb 18, 2014 · 18 comments
Closed

Error: spawn EACCES #54

hced opened this issue Feb 18, 2014 · 18 comments

Comments

@hced
Copy link

hced commented Feb 18, 2014

Running the example command …

❯ pageres todomvc.com yeoman.io 1366x768 1600x900

Gives this error:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn EACCES
    at errnoException (child_process.js:980:11)
    at Process.ChildProcess._handle.onexit (child_process.js:771:34)

And …

❯ sudo !!

… gives the following warning:

You are not allowed to run this app with root permissions.
If running without sudo doesn't work, you can either fix your permission problems or change where npm stores global packages by putting ~/npm/bin in your PATH and running:
npm config set prefix ~/npm

… in which I did the latter part, i.e. adding ~/npm/bin in my $home (had to create the directory) and include it in my $PATH.

Still the same error. Any clues?


Versions of binaries

node 0.10.24
npm 1.3.21
pageres 0.2.3
phantomjs 1.9.7 (The one that came as a dependency when installing pageres)

OS

Mac OS X 10.9.1

@PDXIII
Copy link

PDXIII commented Feb 20, 2014

Same error! Nearly same system (node v.0.10.25).
Tried own domain with and without resolution. Both times same errors.

@jonadeline
Copy link

+1 here

My config :
node 0.10.25
npm 1.3.234
pageres 0.2.3

@todrobbins
Copy link

My error log is a little bit different:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn EACCES
    at errnoException (child_process.js:988:11)
    at Process.ChildProcess._handle.onexit (child_process.js:779:34)

My config:

node: v0.10.26
npm: 1.4.3
phantomjs: 1.9.7
pageres: 0.2.3
OSX: 10.9.1

@sindresorhus
Copy link
Owner

From the readme:

PhantomJS, which is used for generating the screenshots, is installed automagically, but in some rare cases it might fail to and you'll get an Error: spawn EACCES error. Download PhantomJS manually and reinstall pageres if that happens.

@jonadeline
Copy link

I tried to install manually phantom via brew and then install pageres but it still throws the same error :/

@ryanburgess
Copy link

Unfortunately I'm running into the same issue. I tried installing phantomjs manually via brew but it still throws the same error.

@huangyingjie
Copy link

Add x to the file and fixed. I'm not sure the risk but it work.
sudo chmod go+x /usr/local/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs

@jwebcat
Copy link

jwebcat commented Mar 18, 2014

same for me same error

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn EACCES
    at errnoException (child_process.js:988:11)
    at Process.ChildProcess._handle.onexit (child_process.js:779:34)

-_-

@jwebcat
Copy link

jwebcat commented Mar 18, 2014

for anyone still missing out --

this is the way I got pageres to be happy

# if you installed phantomjs with node do this first
> npm -g rm phantomjs

#then 
> brew update && brew install phantomjs

# finally 
> npm install --global pageres

## restart shell just in case
## and there you have it :)

I'm happy to report that it's working perfectly [OSX Mavericks 10.9]

@jwebcat
Copy link

jwebcat commented Mar 18, 2014

HUGE UPS to @sindresorhus

THANKS FOR ALL YOU DO FOR THE DEV COMMUNITY BRO!! :)

all star shazam! for real thanks a million bro.

@hced
Copy link
Author

hced commented Mar 19, 2014

@jwebcat: Thanks, but I did exactly that and the error still shows up :(

@jwebcat
Copy link

jwebcat commented Mar 19, 2014

Did you try giving the file chmod go+x like from the fix vehicles by
someone else above?

On March 19, 2014 4:22:11 AM Henrik Cederblad notifications@github.com wrote:

@jwebcat: Thanks, but I did exactly that but the error still show up :(


Reply to this email directly or view it on GitHub:
#54 (comment)

@thomasklemm
Copy link

Had the same error. Fixed by:

# If running without sudo doesn't work, you can either fix your permission problems
# or change where npm stores global packages by putting ~/npm/bin in your PATH and running:
$ npm config set prefix ~/npm

@Sunil6591
Copy link

got same problem.. i am trying to a .js file using child_process - execFile() inside a node module.
help !

@dv336699
Copy link

@thomasklemm fix worked for me.

@priyankachaturvedi
Copy link

for those who are still stuck in this,It is just the access problem.
phantomjs may not be working on your system, check it by writing phantomjs --v in terminal.
make your phantomjs work properly and the error will be gone :)

@sank64
Copy link

sank64 commented Jul 3, 2015

Bad but efficient method:
Edit pageres/cli.js by removing the line "sudoBlock();"
Save.

@kevva
Copy link
Contributor

kevva commented Jul 3, 2015

@sank64, it's bad practice to use sudo with npm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests