我无法使用npm完成Typescript安装。
正如documentation建议我运行以下命令:
npm install -g typescript
或
sudo npm install -g typescript
-
似乎没问题,直到大约20%的过程无法继续,这是在shell中记录的错误。
npm ERR! fetch failed https://registry.npmjs.org/typescript/-/typescript-1.8.5.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 504
npm ERR! fetch failed https://registry.npmjs.org/typescript/-/typescript-1.8.5.tgz
npm WARN retry will retry, error on last attempt: Error: socket hang up
npm ERR! fetch failed https://registry.npmjs.org/typescript/-/typescript-1.8.5.tgz
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "typescript"
npm ERR! node v5.4.1
npm ERR! npm v3.3.12
npm ERR! fetch failed with status code 504