2016-10-20 108 views
2

我想全球安装phantomjs 1.9.8版本。安装phantomjs /任何软件包全球特定版本

当我跑phantomjs --version这表明我2.1.1

于是我就npm uninstall phantomjs -g这是全成。

接下来,当我尝试运行npm install phantomjs -g 1.9.8它扔我下面的错误

> 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 

我怎么能安装全球pantomjs的所需版本。

PS:我不使用自制软件,并想避免使用自制

回答

1

阅读NPM API文档后,我找到了解决办法。

npm install -g [email protected]

一般来说,

npm install -g [email protected]

使用sudo访问,如果你没有权限。

这将工作,即使降级包全球

相关问题