I want to globally install phantomjs version 1.9.8 globally.
When I ran phantomjs --version it showed me 2.1.1
So I ran npm uninstall phantomjs -g which was successfull.
Next when I try to run npm install phantomjs -g 1.9.8 it is throwing me the below error
> npm WARN deprecated [email protected]: Package renamed to
> phantomjs-prebuilt. Please update 'phantomjs' package references to
> 'phantomjs-prebuilt' npm ERR! Darwin 14.5.0 npm ERR! argv
> "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "phantomjs"
> "1.9.20" npm ERR! node v4.4.7 npm ERR! npm v2.15.8 npm ERR! code E404
>
> npm ERR! 404 Registry returned 404 for GET on
> https://registry.npmjs.org/1.9.20 npm ERR! 404 npm ERR! 404 '1.9.20'
> is not in the npm registry. npm ERR! 404 You should bug the author to
> publish it (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note
> that you can also install from a npm ERR! 404 tarball, folder, http
> url, or git url.
>
> npm ERR! Please include the following file with any support request:
> npm ERR! /work/development/test-folder/npm-debug.log
How could I install a required version of pantomjs globally.
PS : I am not using homebrew and would like to avoid using homebrew
After reading npm api docs, I found the solution.
npm install -g phantomjs@version
In general,
npm install -g packageName@version
use sudo access if you do not have permissions.
This will work even to downgrade the package globally
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With