Phantomjs-prebuilt package is sometimes referenced as part of post-install script that Artifactory's npm external dependency rewrite function cannot catch.
When your npm client does not have access to github.com, then your installation (with debug –dd) may fail with the following logs:
> email@example.com install X:node_modulesphantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Saving to C:Usersc38632AppDataLocalTempphantomjsphantomjs-2.1.1-windows.z
Error making request.
Error: connect ETIMEDOUT 22.214.171.124:443
at Object.exports._errnoException (util.js:860:11)
at exports._exceptionWithHostPort (util.js:883:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)
If you would like to block your client machine from directly accessing github to download the file, then you may use following steps:
1. Manually download files from https://bitbucket.org/ariya/phantomjs/downloads to a local disk
2. Create a new GENERIC repository in Artifactory and upload the files downloaded above. (You will not be able to make the URL above as a remote repository, because the remote URL is blocking HEAD request. See https://www.jfrog.com/jira/browse/RTFACT-11923 for more details about this limitation)
3. Add property into your .npmrc file (https://www.npmjs.org/doc/files/npmrc.html)
For more information, visit