Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
13
rated 0 times [  15] [ 2]  / answers: 1 / hits: 48879  / 6 Years ago, wed, march 7, 2018, 12:00:00

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:WindowsSystem32>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:ProfilescjollietAppDataRoamingnpm-cache_logs2018-03-07T09_31_22_439Z-debug.log
C:WindowsSystem32>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:ProfilescjollietAppDataRoamingnpm-cache_logs2018-03-07T09_40_04_399Z-debug.log
C:WindowsSystem32>
C:WindowsSystem32>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:ProfilescjollietAppDataRoamingnpm-cache_logs2018-03-07T09_44_05_319Z-debug.log


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



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:ProfilescjollietAppDataRoamingnpmnode_modules.stagingpath-is-absolute-86a430cbpackage.json'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingparseurl-f42ab09dpackage.json'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingpath-is-absolute-86a430cbindex.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingopn-07c4c2ddpackage.json'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingos-tmpdir-c1eaefc0package.json'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingparse-glob-106d32b7package.json'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingparseurl-f42ab09dREADME.md'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingpath-is-absolute-86a430cblicense'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingopn-07c4c2ddindex.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingos-tmpdir-c1eaefc0index.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingparse-glob-106d32b7README.md'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingparseurl-f42ab09dLICENSE'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingsuperagent-4d7c9590libagent-base.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingpath-is-absolute-86a430cbreadme.md'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingos-tmpdir-c1eaefc0license'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingopn-07c4c2ddlicense'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingparse-glob-106d32b7LICENSE'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingparseurl-f42ab09dindex.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingsuperagent-4d7c9590libclient.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingopn-07c4c2ddreadme.md'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingos-tmpdir-c1eaefc0readme.md'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingparse-glob-106d32b7index.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingparseurl-f42ab09dHISTORY.md'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingopn-07c4c2ddxdg-open'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.staginginquirer-b71d51ablibutilsevents.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.staginginquirer-b71d51ablibutilspaginator.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.staginginquirer-b71d51ablibutilsreadline.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.staginginquirer-b71d51ablibutilsscreen-manager.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingreaddirp-34d428eatestbedroot_dir2root_dir2_file1.ext1'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.staginginquirer-b71d51ablibutilsutils.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingreaddirp-34d428eatestbedroot_dir2root_dir2_file2.ext2'
npm WARN tar ENOENT: no such file or directory, lstat 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingcordova-lib-a64e9936srccordovametadata'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingqs-095a6ca4libformats.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingqs-095a6ca4libindex.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingqs-095a6ca4libparse.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingqs-095a6ca4libstringify.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingqs-095a6ca4libutils.js'
npm WARN tar ENOENT: no such file or directory, lstat 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingcordova-app-hello-world-60bb7e30template_srcresiconblackberry10'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingtiny-lr-cf15ff1csrcclient.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingtiny-lr-cf15ff1csrcindex.js'
npm WARN tar ENOENT: no such file or directory, open 'd:ProfilescjollietAppDataRoamingnpmnode_modules.stagingtiny-lr-cf15ff1csrcserver.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)

More From » node.js

 Answers
74

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



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


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 uses npm by default. So go to your project & run $ yarn install.



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


[#54998] Saturday, March 3, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
loganl

Total Points: 424
Total Questions: 86
Total Answers: 112

Location: Zimbabwe
Member since Thu, Jul 21, 2022
2 Years ago
;