安装 "atom-beautify@0.33.0" 失败

install "atom-beautify@0.33.0" failed

我已经安装了 atom-beautify 包,我收到了这个通知:

gyp info it worked if it ends with ok
gyp info using node-gyp@3.4.0
gyp info using node@6.9.5 | win32 | x64
gyp http GET https://atom.io/download/electron/v2.0.5/iojs-v2.0.5.tar.gz
gyp http 200 https://atom.io/download/electron/v2.0.5/iojs-v2.0.5.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! install error 
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack     at exports._errnoException (util.js:1022:11)
gyp ERR! stack     at TLSWrap.onread (net.js:569:26)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Users\Quy Nguyen\AppData\Local\atom\app-1.30.0\resources\app\apm\bin\node.exe" "C:\Users\Quy Nguyen\AppData\Local\atom\app-1.30.0\resources\app\apm\node_modules\node-gyp\bin\node-gyp.js" "install" "--runtime=electron" "--target=2.0.5" "--dist-url=https://atom.io/download/electron" "--arch=x64" "--ensure"
gyp ERR! cwd C:\Users\Quy Nguyen\.atom
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 

但有时我会有不同的输出:

npm WARN deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated @types/commander@2.12.2: This is a stub types definition for commander (https://github.com/tj/commander.js). commander provides its own type definitions, so you don't need @types/commander installed!
npm WARN deprecated jscs-preset-wikimedia@1.0.1: Deprecated in favour of eslint-config-wikimedia. -- https://phabricator.wikimedia.org/T118941
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\Users\Quy Nguyen\AppData\Local\atom\app-1.30.0\resources\app\apm\bin\node.exe" "C:\Users\Quy Nguyen\AppData\Local\atom\app-1.30.0\resources\app\apm\node_modules\npm\bin\npm-cli.js" "--globalconfig" "C:\Users\Quy Nguyen\.atom\.apm\.apmrc" "--userconfig" "C:\Users\Quy Nguyen\.atom\.apmrc" "install" "C:\Users\QUYNGU~1\AppData\Local\Temp\d-11882-10676-1pd8cj3.buptceg66r\package.tgz" "--runtime=electron" "--target=2.0.5" "--arch=x64" "--global-style" "--msvs_version=2015"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code EREADFILE

npm ERR! Error extracting C:\Users\Quy Nguyen\.atom\.apm\marko.13.3\package.tgz archive: ENOENT: no such file or directory, open 'C:\Users\Quy Nguyen\.atom\.apm\marko.13.3\package.tgz'
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\QUYNGU~1\AppData\Local\Temp\apm-install-dir-11882-10676-1ak13y1.o2hmklz0k9\npm-debug.log

我不明白它是如何工作的。

感谢您的帮助!

在 Linux/Mac,问题已通过以下步骤解决:

打开终端 (Ctrl+Alt+T)

cd /home/your_username/.atom/.apm/marko

ln -s 4.13.4 4.13.3

apm install atom-beautify

在 Windows 上,您可以使用 Git Bash 并执行上述步骤。

或者,在 Windows 上执行以下步骤:

打开cmd/powershell

cd C:\Users\your_username\.atom\.apm\marko

mklink /J 4.13.3 4.13.4

apm install atom-beautify

我正在使用 windows 10 64 位。我差点因为安装 atom-beautify 掉下了脑袋。我收到 "npm ERR! zlib: unexpected end of file"。我尝试了一切。最后我重新安装了 atom 然后删除了 .apm 文件,最后能够安装 atom-beautify 包。希望这些信息对某人有所帮助。

删除 .apm 文件夹后,我可以安装 atom-beautify 包。

关闭 Windows 防火墙和杀毒软件对我有用。