错误:npm ERR!写完了 [英] Error: npm ERR! write after end

查看:6090
本文介绍了错误:npm ERR!写完了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在安装 Cordova Ionic 时遇到问题。
起初我不能因为看起来像是一个损坏的安装,导致我卸载NodeJS - Cordova - Ionic。


现在,我已经重新安装了NodeJS,没有问题,但是当涉及到着名的产品线:

npm install -g cordova离子,我有这个错误:

npm ERR!结束后写
然后每当我尝试安装cordova离子时,我对于不同的包有同样的错误...
这是我得到的错误:

I am having issues installing Cordova and Ionic. At first I couldn't because of what seems to be a corrupted installation, that led me to uninstall NodeJS - Cordova - Ionic.

Now, I've reinstalled NodeJS, without issues but when it comes to the famous line :
npm install -g cordova ionic, I've got this error :
npm ERR! write after end then everytime I try to install cordova ionic, I've got the same error for a different package ...
Here are errors I get :

C:\Windows\System32>npm install -g cordova ionic
npm ERR! write after end    
npm ERR! A complete log of this run can be found in:
npm ERR!     d:\Profiles\cjolliet\AppData\Roaming\npm-cache\_logs\2018-03-07T09_31_22_439Z-debug.log    
C:\Windows\System32>npm install -g cordova ionic
npm ERR! code ETARGET
npm ERR! notarget No matching version found for ansi-styles@^3.2.1
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'chalk'
npm ERR! notarget    
npm ERR! A complete log of this run can be found in:
npm ERR!     d:\Profiles\cjolliet\AppData\Roaming\npm-cache\_logs\2018-03-07T09_40_04_399Z-debug.log    
C:\Windows\System32>
C:\Windows\System32>npm install -g cordova ionic
npm ERR! code ETARGET
npm ERR! notarget No matching version found for supports-color@^5.3.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'chalk'
npm ERR! notarget    
npm ERR! A complete log of this run can be found in:
npm ERR!     d:\Profiles\cjolliet\AppData\Roaming\npm-cache\_logs\2018-03-07T09_44_05_319Z-debug.log

如果你们中的任何人都可以帮助我,那将非常感谢;-)祝你有愉快的一天...

If any of you can help me, it would be very appreciate ;-) Have a nice day...

编辑1:在安装了一些软件包并再次尝试之后,我现在已经有了这个:

EDIT 1 : after installing some packages and trying again, I've got this now :

npm install -g cordova ionic
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\path-is-absolute-86a430cb\package.json'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\parseurl-f42ab09d\package.json'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\path-is-absolute-86a430cb\index.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\opn-07c4c2dd\package.json'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\os-tmpdir-c1eaefc0\package.json'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\parse-glob-106d32b7\package.json'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\parseurl-f42ab09d\README.md'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\path-is-absolute-86a430cb\license'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\opn-07c4c2dd\index.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\os-tmpdir-c1eaefc0\index.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\parse-glob-106d32b7\README.md'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\parseurl-f42ab09d\LICENSE'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\superagent-4d7c9590\lib\agent-base.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\path-is-absolute-86a430cb\readme.md'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\os-tmpdir-c1eaefc0\license'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\opn-07c4c2dd\license'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\parse-glob-106d32b7\LICENSE'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\parseurl-f42ab09d\index.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\superagent-4d7c9590\lib\client.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\opn-07c4c2dd\readme.md'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\os-tmpdir-c1eaefc0\readme.md'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\parse-glob-106d32b7\index.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\parseurl-f42ab09d\HISTORY.md'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\opn-07c4c2dd\xdg-open'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\inquirer-b71d51ab\lib\utils\events.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\inquirer-b71d51ab\lib\utils\paginator.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\inquirer-b71d51ab\lib\utils\readline.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\inquirer-b71d51ab\lib\utils\screen-manager.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\readdirp-34d428ea\test\bed\root_dir2\root_dir2_file1.ext1'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\inquirer-b71d51ab\lib\utils\utils.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\readdirp-34d428ea\test\bed\root_dir2\root_dir2_file2.ext2'
npm WARN tar ENOENT: no such file or directory, lstat 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\cordova-lib-a64e9936\src\cordova\metadata'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\qs-095a6ca4\lib\formats.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\qs-095a6ca4\lib\index.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\qs-095a6ca4\lib\parse.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\qs-095a6ca4\lib\stringify.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\qs-095a6ca4\lib\utils.js'
npm WARN tar ENOENT: no such file or directory, lstat 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\cordova-app-hello-world-60bb7e30\template_src\res\icon\blackberry10'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\tiny-lr-cf15ff1c\src\client.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\tiny-lr-cf15ff1c\src\index.js'
npm WARN tar ENOENT: no such file or directory, open 'd:\Profiles\cjolliet\AppData\Roaming\npm\node_modules\.staging\tiny-lr-cf15ff1c\src\server.js'
npm ERR! code EINTEGRITY
npm ERR! Verification failed while extracting readable-stream@^2.0.5:
npm ERR! sha512-vuYxeWYM+fde14+rajzqgeohAI7YoJcHE7kXDAc4Nk0EbuKnJfqtY9YtRkLo/tqkuF7MsBQRhPnPeyjYITp3ZQ== integrity checksum failed when using sha512: wanted sha512-vuYxeWYM+fde14+rajzqgeohAI7YoJcHE7kXDAc4Nk0EbuKnJfqtY9YtRkLo/tqkuF7MsBQRhPnPeyjYITp3ZQ== but got sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==. (25689 bytes)


推荐答案

尝试安装最新的npm版本离子很多。

Try installing latest npm version this happens a lot with ionic.

npm install -g npm@latest
npm cache verify
npm i 

如果这不起作用,我建议你改用纱线。它更快更快更容易使用。这是下载YARN的链接
安装完成后运行此命令 yarn global add cordova ionic

If this doesn't work I advise you to switch to yarn. It's faster & easier to use. This is the link to download YARN. After installing just run this command yarn global add cordova ionic

Ionic CLI默认使用npm。所以去你的项目&运行 $ yarn install

Ionic CLI uses npm by default. So go to your project & run $ yarn install.

如果您希望Ionic默认使用纱线运行: $ ionic config set -g yarn true

If you want Ionic to use yarn by default run this: $ ionic config set -g yarn true

这篇关于错误:npm ERR!写完了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆