Error npm ERR write after end

0 votes

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

Can anyone help me out??

Apr 22, 2020 in Angular by kartik
• 37,520 points
1,683 views

1 answer to this question.

0 votes

Hello @kartik,

Let, update the latest version of npm for running this command,

npm install npm@latest -g

Then run this command,

npm install -g cordova ionic

Hope that works fine!!!

Thank You!!

answered Apr 22, 2020 by Niroj
• 82,840 points

Related Questions In Angular

0 votes
1 answer

How can we reload a page after requesting the same get parameter using AngularJS?

hey kartik, The reason for this is that ...READ MORE

answered Feb 10, 2020 in Angular by Niroj
• 82,840 points
12,641 views
0 votes
1 answer

Where does the data resides after having resolve operation in routing?

Hii, In a workflow of routing with resolve ...READ MORE

answered Feb 10, 2020 in Angular by Niroj
• 82,840 points
549 views
0 votes
1 answer

Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'

Hii kartik, Removing the node_modules and the package-lock.json ...READ MORE

answered Apr 22, 2020 in Angular by Niroj
• 82,840 points
16,349 views
0 votes
1 answer

What are the vulnerability related to PHP Form?

Hii, The $_SERVER["PHP_SELF"] variable can be used by ...READ MORE

answered Feb 13, 2020 in PHP by Niroj
• 82,840 points
3,193 views
+1 vote
1 answer

How can we send message multiple time to a specific person or group in whatsapp using loop?

Hii @kartik,  This is simple task to send single ...READ MORE

answered Feb 28, 2020 in Java-Script by Niroj
• 82,840 points
18,664 views
0 votes
1 answer

What is meant by passing the variable by value and reference in PHP?

Hello, When the variable is passed as value ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,840 points
3,267 views
0 votes
1 answer

Connection with MySQL server using PHP. How can we do that?

Hey @kartik, You have to provide MySQL hostname, ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,840 points
1,300 views
0 votes
1 answer

How can we go back to previous page after having some error on request made through current page ?

$route is used for deep-linking URLs to controllers ...READ MORE

answered Feb 11, 2020 in Angular by Niroj
• 82,840 points
1,251 views
0 votes
1 answer

Error while installing angular/cli using npm

Hello @kartik, First of all, all the things ...READ MORE

answered Apr 22, 2020 in Angular by Niroj
• 82,840 points
5,901 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP