Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error after updating npm, cordova

Tags:

cordova

umask

I updated npm and cordova, after which I'm not able to run any of the cordova commands from terminal. Here is the error which I get:

Avinash-mac-mini:~ avinash$ cordova
module.js:339
    throw err;


Error: Cannot find module 'umask'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/npm/lib/utils/umask.js:1:75)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
like image 601
Avinash Avatar asked Nov 16 '15 10:11

Avinash


People also ask

How do I fix npm installation errors?

If your npm is broken: On Mac or Linux, reinstall npm. Windows: If you're on Windows and you have a broken installation, the easiest thing to do is to reinstall node from the official installer (see this note about installing the latest stable version).

Why npm is not working?

The Npm command not found error can appear when you install or upgrade npm. On Windows, the cause of this error could be that a PATH or system variable is not correctly set. The error can also occur if you do not have npm or Node. js installed, have an outdated version, or have permission issues.

What is npm err code Enoent?

The code ENOENT means that npm fails to open a file or directory that's required for executing the command. The npm start command is used to run the start script in the package.

How do I resolve issues with npm install?

Some strange issues can be resolved by simply running npm cache clean and trying again. If you are having trouble with npm install, use the -verbose option to see more details.

Why am I getting enoent stat 'c:\users:\user>\AppData\Roaming\NPM' error on Windows 7?

The error Error: ENOENT, stat 'C:\Users\<user>\AppData\Roaming\npm' on Windows 7 is a consequence of joyent/node#8141, and is an issue with the Node installer for Windows. The workaround is to ensure that C:\Users\<user>\AppData\Roaming\npm exists and is writable with your normal user account. npm ERR!

Why am I getting a SyntaxError in NPM?

It's most likely a temporary npm registry glitch. Check npm server status and try again later. If the error persists, perhaps the published package is corrupt. Contact the package owner and have them publish a new version of the package. npm ERR! SyntaxError: Unexpected token <

Does PhoneGap 10995 affect Cordova?

Sorry, something went wrong. #10995 is on Unix, so this isn't a Windows-only bug, and this affects both Cordova and Phonegap. Sorry, something went wrong.


1 Answers

try executing

npm uninstall -g cordova 
npm install -g cordova@latest
like image 148
frazras Avatar answered Sep 20 '22 17:09

frazras