Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Fails to install on a Mac due to error with dependency phantomjs (prebuilt) #433

Open
ndeeH opened this issue Feb 5, 2018 · 6 comments
Open

Comments

@ndeeH
Copy link

ndeeH commented Feb 5, 2018

  1. Which version of PhantomJS are you using? Tip: run phantomjs --version.
    v2.1.1/phantomjs-2.1.1-macosx.zip

  2. What steps will reproduce the problem?

  3. we wanted to install vorlonjs (sudo npm i -g vorlon)

  4. this fails due to an EACCES when installing a link

Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1517823958480/phantomjs-2.1.1-macosx -> /usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/lib/phantom
Phantom installation failed { Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1517823958480/phantomjs-2.1.1-macosx' -> '/usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/lib/phantom'
 errno: -13,
 code: 'EACCES',
 syscall: 'link',
 path: '/tmp/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1517823958480/phantomjs-2.1.1-macosx',
 dest: '/usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1517823958480/phantomjs-2.1.1-macosx' -> '/usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/lib/phantom'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
  1. Which operating system are you using?
    mac os x el capitan (10.11.6)

  2. Did you use binary PhantomJS or did you compile it from source?

  3. Please provide any additional information below.

Considering PhantomJS found at /usr/local/bin/phantomjs

Looks like an `npm install -g`

Found PhantomJS at /usr/local/lib/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ...verifying

Writing location.js file

Error checking path, continuing { Error: EACCES: permission denied, open '/usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/lib/location.js'

    at Object.fs.openSync (fs.js:646:18)

    at Object.fs.writeFileSync (fs.js:1291:33)

    at writeLocationFile (/usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/lib/util.js:84:6)

    at Promise._successFn (/usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/install.js:366:11)

    at nextTickCallback (/usr/local/lib/node_modules/vorlon/node_modules/kew/kew.js:47:28)

    at _combinedTickCallback (internal/process/next_tick.js:131:7)

    at process._tickCallback (internal/process/next_tick.js:180:9)

  errno: -13,

  code: 'EACCES',

  syscall: 'open',

  path: '/usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/lib/location.js' }

Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-macosx.zip

Saving to /tmp/phantomjs/phantomjs-2.1.1-macosx.zip

Receiving...

  [========================================] 99%

Received 16746K total.

Extracting zip contents

Removing /usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/lib/phantom

Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1517823958480/phantomjs-2.1.1-macosx -> /usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/lib/phantom

Phantom installation failed { Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1517823958480/phantomjs-2.1.1-macosx' -> '/usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/lib/phantom'

  errno: -13,

  code: 'EACCES',

  syscall: 'link',

  path: '/tmp/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1517823958480/phantomjs-2.1.1-macosx',

  dest: '/usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1517823958480/phantomjs-2.1.1-macosx' -> '/usr/local/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt/lib/phantom'

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.



npm ERR! A complete log of this run can be found in:

npm ERR!     




@Innercode
Copy link

Same issue on Ubuntu as well.

@Innercode
Copy link

@weird-dreams Can you try to install with the sudo npm i -g vorlon --unsafe-perm command? It works for me :)

@yacineblr
Copy link

Same of me on Ubuntu 16.04

Thanks @Innercode for solution !

@MarkEhr
Copy link

MarkEhr commented Mar 6, 2019

I could install it in nvm node installation even without sudo, native and n ones wouldn't work

@vorti2
Copy link

vorti2 commented Mar 7, 2019

Same here on my MacOS 10.14.3 (Mojave):

> npm i -g vorlon --unsafe-perm
npm WARN deprecated jade@1.9.2: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/Users/xx/.nvm/versions/node/v11.0.0/bin/vorlon -> /Users/xx/.nvm/versions/node/v11.0.0/lib/node_modules/vorlon/bin/vorlon

> phantomjs-prebuilt@2.1.16 install /Users/xx/.nvm/versions/node/v11.0.0/lib/node_modules/vorlon/node_modules/phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-macosx.zip
Saving to /var/folders/tr/hkwh1479211gv8pxj0mcznw40000gp/T/phantomjs/phantomjs-2.1.1-macosx.zip
Receiving...

Error making request.
Error: connect ECONNREFUSED 10.4.11.76:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)

Please report this full log at https://github.com/Medium/phantomjs
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

phantom.js can't be downloaded from Github.

@Hansel-Christopher
Copy link

had the same error, changed my node version to v6 lts from v12 with nvm and it worked. hope it helps :)

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

No branches or pull requests

6 participants