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)
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).
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.
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.
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.
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!
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 <
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.
try executing
npm uninstall -g cordova
npm install -g cordova@latest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With