Medium / phantomjs

NPM wrapper for installing phantomjs
Other
1.42k stars 436 forks source link

Install error #792

Closed PeterChen1997 closed 5 years ago

PeterChen1997 commented 6 years ago

Ops, here is something wrong when i install phatomjs

> phantomjs@2.1.7 install /usr/local/lib/node_modules/phantomjs
> node install.js

Considering PhantomJS found at /usr/local/bin/phantomjs
Looks like an `npm install -g`
Error checking path, continuing { Error: Cannot find module '/usr/local/lib/node_modules/phantomjs/lib/location'
    at Function.Module._resolveFilename (module.js:542:15)
    at Function.Module._load (module.js:472:25)
    at Module.require (module.js:585:17)
    at require (internal/module.js:11:18)
    at getLocationInLibModuleIfMatching (/usr/local/lib/node_modules/phantomjs/install.js:332:19)
    at Promise._successFn (/usr/local/lib/node_modules/phantomjs/install.js:389:28)
    at nextTickCallback (/usr/local/lib/node_modules/phantomjs/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) code: 'MODULE_NOT_FOUND' }
/usr/local/lib/node_modules/phantomjs/phantomjs is not writable: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/phantomjs/phantomjs'
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1//phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...

Error making request.
Error: self signed certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1036:34)
    at TLSSocket.emit (events.js:159:13)
    at TLSSocket._finishInit (_tls_wrap.js:637:8)

Please report this full log at https://github.com/Medium/phantomjs
jonguan commented 6 years ago

Try this on your command line: npm set strict-ssl false

carlosonunez commented 5 years ago

Ensure that your cafile is set to a .pem file containing your company's intermediate and root certificates (in that order). You can set that by running npm config set cafile=/path/to/ca.pem