Please help...can't update cordova with npm

(Harrykwan) #1

when i try to update cordova

sudo npm i -g cordova

i also tried
sudo chown -f -R $(whoami) ~/.npm

but the error remains


Unhandled rejection Error: EISDIR: illegal operation on a directory, open ā€˜/Users/user/.npm/_cacache/index-v5/13/29ā€™

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2019-03-31T06_40_17_263Z-debug.log


0 Likes

(Harrykwan) #2

sudo cordova platform add android

Using cordova-fetch for cordova-android@~7.1.1

Failed to fetch platform cordova-android@~7.1.1

Probably this is either a connection problem, or platform spec is incorrect.

Check your connection and platform name/version/URL.

Error: npm: Command failed with exit code 1 Error output:

Unhandled rejection Error: EISDIR: illegal operation on a directory, open ā€˜/Users/user/.npm/_cacache/content-v2/sha512/ad/22ā€™

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:

npm ERR! <https://npm.community>

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/user/.npm/_logs/2019-03-31T06_52_44_073Z-debug.log

0 Likes

(John Gee) #3

I am stumped. A couple of questions, what do these show:

npm prefix -g
echo $SHELL

(It is good practice to avoid using sudo with npm, but that does take extra setup. Iā€™m exploring other quick fixes before going down that route.)

0 Likes

(system) closed #4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

0 Likes