{"action":"opened","issue":{"url":"https://api.github.com/repos/sunnylost/web-weekly/issues/2","labels_url":"https://api.github.com/repos/sunnylost/web-weekly/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/sunnylost/web-weekly/issues/2/comments","events_url":"https://api.github.com/repos/sunnylost/web-weekly/issues/2/events","html_url":"https://github.com/sunnylost/web-weekly/issues/2","id":56952800,"number":2,"title":"如何避免 node-gyp 下载 node 源码","user":{"login":"sunnylost","id":693496,"avatar_url":"https://avatars.githubusercontent.com/u/693496?v=3","gravatar_id":"","url":"https://api.github.com/users/sunnylost","html_url":"https://github.com/sunnylost","followers_url":"https://api.github.com/users/sunnylost/followers","following_url":"https://api.github.com/users/sunnylost/following{/other_user}","gists_url":"https://api.github.com/users/sunnylost/gists{/gist_id}","starred_url":"https://api.github.com/users/sunnylost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunnylost/subscriptions","organizations_url":"https://api.github.com/users/sunnylost/orgs","repos_url":"https://api.github.com/users/sunnylost/repos","events_url":"https://api.github.com/users/sunnylost/events{/privacy}","received_events_url":"https://api.github.com/users/sunnylost/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sunnylost/web-weekly/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-08T14:16:08Z","updated_at":"2015-02-08T14:16:08Z","closed_at":null,"body":"在执行 `node-gyp configure` 时，node-gyp 会检测 node 版本，如果发现版本没有编译过，会去官网下载 node 对应版本的源码。由于下载速度比较慢，导致耗时较长。\r\n\r\n解决办法是，手动下载源码，解压缩到某个目录下，执行 `node-gyp configure --nodedir 路径` 即可。\r\n\r\n`--verbose` 参数可以显示详细执行信息。"}}