如何解决atom无法安装package的问题

不知道你们有没有遇到类似的情况。 apm install failed in HTTP 404 error when gyp is downloading node.js with a fresh install atom #11080

使用atom在线安装插件总是失败,之前遇到这个问题我直接用git clone下载插件,然后执行npm install也是可以的。但是不能用到atom的在线安装,总有点不甘。后来查了很多文档,找到了原因……

首先明确一下,这个原因是出现在gyp这个native build tools版本过低

这个是我在Github上的回复

1
2
3
4
5
6
7
8
9
I use shadowsocks proxy ,edit the file ~/.atom/.apmrc:
strict-ssl = false
proxy=http://127.0.0.1:1080/
http_proxy=proxy
https_proxy=proxy
and then run apm install --check
if success you will see Checking for native build tools done
remember,shadowsocks mode choose system agent mode

简单来说就是配置~/.atom/.apmrc这个文件的代理地址,将shadowsocks或对应的科学上网工具设置成全局(不要问我为什么要全局,因为我懒..)

然后执行apm install --check,如果返回成功信息,这样就把本地构建工具更新成功了,就可以使用atom的在线安装插件服务了

实在没办法 下载源码自己手动npm install也是个不错的选择啦

文章目录