安装"atom-beautify@0.33.0"失败



我已经安装了原子美化软件包,并收到了以下通知:

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:UsersQuy 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:UsersQuy Nguyen.atom.apmmarko4.13.3package.tgz archive: ENOENT: no such file or directory, open 'C:UsersQuy Nguyen.atom.apmmarko4.13.3package.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:UsersQUYNGU~1AppDataLocalTempapm-install-dir-11882-10676-1ak13y1.o2hmklz0k9npm-debug.log

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

感谢您的帮助!

我使用的是Windows 10 64位。我差点把掉下来的脑袋扯破了。我收到"npm 错误!zlib:意外的文件结尾"。我什么都试过了。最后我重新安装了atom,然后删除了.apm文件,最后能够安装atom-beautify软件包。希望这些信息对某人有所帮助。

在 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:Usersyour_username.atom.apmmarko
mklink /J 4.13.3 4.13.4
apm install atom-beautify

删除.apm文件夹后,我能够安装atom-beautify软件包。

是的,这有效!

对于 MAC/LINUX

打开终端

cd /home/your_username/.atom/.apm/marko
ln -s 4.13.4 4.13.3
apm install atom-beautify

对于视窗

打开 cmd/powershell

cd C:Usersyour_username.atom.apmmarko
mklink /J 4.13.3 4.13.4
apm install atom-beautify

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

最新更新