Failed to fetch plugin github:razorpay/razorpay-cordova via registry - cordova-plugins

I'm getting error while adding the razorpay-cordova plugin in ionic 6 project. I have added my ionic info and error. I even tried to add it via local folder but got similar
ionic cordova plugin add D:\SAM\Fantasy\razorpay-cordova --f
> cordova.cmd plugin add D:\SAM\Fantasy\razorpay-cordova
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #angular/cdk#12.1.1
npm ERR! Found: #angular/common#11.2.14
npm ERR! node_modules/#angular/common
npm ERR! peer #angular/common#"11.2.14" from #angular/forms#11.2.14
npm ERR! node_modules/#angular/forms
npm ERR! peer #angular/forms#">=8.2.7" from #ionic/angular#5.6.10
npm ERR! node_modules/#ionic/angular
npm ERR! #ionic/angular#"^5.5.2" from the root project
npm ERR! peer #angular/forms#"^11.0.0" from #ng-bootstrap/ng-bootstrap#9.1.3
npm ERR! node_modules/#ng-bootstrap/ng-bootstrap
npm ERR! #ng-bootstrap/ng-bootstrap#"^9.1.3" from the root project
npm ERR! 1 more (the root project)
npm ERR! peer #angular/common#"11.2.14" from #angular/platform-browser#11.2.14
npm ERR! node_modules/#angular/platform-browser
npm ERR! peer #angular/platform-browser#"11.2.14" from #angular/forms#11.2.14
npm ERR! node_modules/#angular/forms
npm ERR! peer #angular/forms#">=8.2.7" from #ionic/angular#5.6.10
npm ERR! node_modules/#ionic/angular
npm ERR! #ionic/angular#"^5.5.2" from the root project
npm ERR! 2 more (#ng-bootstrap/ng-bootstrap, the root project)
npm ERR! peer #angular/platform-browser#"11.2.14" from #angular/platform-browser-dynamic#11.2.14
npm ERR! node_modules/#angular/platform-browser-dynamic
npm ERR! #angular/platform-browser-dynamic#"~11.2.0" from the root project
npm ERR! 2 more (#angular/router, the root project)
npm ERR! 9 more (#angular/platform-browser-dynamic, #angular/router, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/common#"^12.0.0 || ^13.0.0-0" from #angular/cdk#12.1.1
npm ERR! node_modules/#angular/cdk
npm ERR! peer #angular/cdk#">=8.0.0" from ngx-sharebuttons#8.0.5
npm ERR! node_modules/ngx-sharebuttons
npm ERR! ngx-sharebuttons#"^8.0.5" from the root project
npm ERR! #angular/cdk#"^12.1.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #angular/common#13.3.11
npm ERR! node_modules/#angular/common
npm ERR! peer #angular/common#"^12.0.0 || ^13.0.0-0" from #angular/cdk#12.1.1
npm ERR! node_modules/#angular/cdk
npm ERR! peer #angular/cdk#">=8.0.0" from ngx-sharebuttons#8.0.5
npm ERR! node_modules/ngx-sharebuttons
npm ERR! ngx-sharebuttons#"^8.0.5" from the root project
npm ERR! #angular/cdk#"^12.1.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\spal\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\spal\AppData\Local\npm-cache\_logs\2022-09-07T07_25_02_472Z-debug-0.log
at ChildProcess.whenDone (C:\Users\spal\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\src\superspawn.js:136:25)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.cp.emit (C:\Users\spal\AppData\Roaming\npm\node_modules\cordova\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1093:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
stderr: 'npm ERR! code ERESOLVE\n' +
'npm ERR! ERESOLVE could not resolve\n' +
'npm ERR! \n' +
'npm ERR! While resolving: #angular/cdk#12.1.1\n' +
'npm ERR! Found: #angular/common#11.2.14\n' +
'npm ERR! node_modules/#angular/common\n' +
'npm ERR! peer #angular/common#"11.2.14" from #angular/forms#11.2.14\n' +
'npm ERR! node_modules/#angular/forms\n' +
'npm ERR! peer #angular/forms#">=8.2.7" from #ionic/angular#5.6.10\n' +
'npm ERR! node_modules/#ionic/angular\n' +
'npm ERR! #ionic/angular#"^5.5.2" from the root project\n' +
'npm ERR! peer #angular/forms#"^11.0.0" from #ng-bootstrap/ng-bootstrap#9.1.3\n' +
'npm ERR! node_modules/#ng-bootstrap/ng-bootstrap\n' +
'npm ERR! #ng-bootstrap/ng-bootstrap#"^9.1.3" from the root project\n' +
'npm ERR! 1 more (the root project)\n' +
'npm ERR! peer #angular/common#"11.2.14" from #angular/platform-browser#11.2.14\n' +
'npm ERR! node_modules/#angular/platform-browser\n' +
'npm ERR! peer #angular/platform-browser#"11.2.14" from #angular/forms#11.2.14\n' +
'npm ERR! node_modules/#angular/forms\n' +
'npm ERR! peer #angular/forms#">=8.2.7" from #ionic/angular#5.6.10\n' +
'npm ERR! node_modules/#ionic/angular\n' +
'npm ERR! #ionic/angular#"^5.5.2" from the root project\n' +
'npm ERR! 2 more (#ng-bootstrap/ng-bootstrap, the root project)\n' +
'npm ERR! peer #angular/platform-browser#"11.2.14" from #angular/platform-browser-dynamic#11.2.14\n' +
'npm ERR! node_modules/#angular/platform-browser-dynamic\n' +
'npm ERR! #angular/platform-browser-dynamic#"~11.2.0" from the root project\n' +
'npm ERR! 2 more (#angular/router, the root project)\n' +
'npm ERR! 9 more (#angular/platform-browser-dynamic, #angular/router, ...)\n' +
'npm ERR! \n' +
'npm ERR! Could not resolve dependency:\n' +
'npm ERR! peer #angular/common#"^12.0.0 || ^13.0.0-0" from #angular/cdk#12.1.1\n' +
'npm ERR! node_modules/#angular/cdk\n' +
'npm ERR! peer #angular/cdk#">=8.0.0" from ngx-sharebuttons#8.0.5\n' +
'npm ERR! node_modules/ngx-sharebuttons\n' +
'npm ERR! ngx-sharebuttons#"^8.0.5" from the root project\n' +
'npm ERR! #angular/cdk#"^12.1.1" from the root project\n' +
'npm ERR! \n' +
'npm ERR! Conflicting peer dependency: #angular/common#13.3.11\n' +
'npm ERR! node_modules/#angular/common\n' +
'npm ERR! peer #angular/common#"^12.0.0 || ^13.0.0-0" from #angular/cdk#12.1.1\n' +
'npm ERR! node_modules/#angular/cdk\n' +
'npm ERR! peer #angular/cdk#">=8.0.0" from ngx-sharebuttons#8.0.5\n' +
'npm ERR! node_modules/ngx-sharebuttons\n' +
'npm ERR! ngx-sharebuttons#"^8.0.5" from the root project\n' +
'npm ERR! #angular/cdk#"^12.1.1" from the root project\n' +
'npm ERR! \n' +
'npm ERR! Fix the upstream dependency conflict, or retry\n' +
'npm ERR! this command with --force, or --legacy-peer-deps\n' +
'npm ERR! to accept an incorrect (and potentially broken) dependency resolution.\n' +
'npm ERR! \n' +
'npm ERR! See C:\\Users\\spal\\AppData\\Local\\npm-cache\\eresolve-report.txt for a full report.\n' +
'\n' +
'npm ERR! A complete log of this run can be found in:\n' +
'npm ERR! C:\\Users\\spal\\AppData\\Local\\npm-cache\\_logs\\2022-09-07T07_25_02_472Z-debug-0.log\n',
code: 1
}
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd plugin add D:\SAM\Fantasy\razorpay-cordova exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
error.
ionic cordova plugin add com.razorpay.cordova --f
> cordova.cmd plugin add com.razorpay.cordova
Failed to fetch plugin github:razorpay/razorpay-cordova via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #angular/cdk#12.1.1
npm ERR! Found: #angular/common#11.2.14
npm ERR! node_modules/#angular/common
npm ERR! peer #angular/common#"11.2.14" from #angular/forms#11.2.14
npm ERR! node_modules/#angular/forms
npm ERR! peer #angular/forms#">=8.2.7" from #ionic/angular#5.6.10
npm ERR! node_modules/#ionic/angular
npm ERR! #ionic/angular#"^5.5.2" from the root project
npm ERR! peer #angular/forms#"^11.0.0" from #ng-bootstrap/ng-bootstrap#9.1.3
npm ERR! node_modules/#ng-bootstrap/ng-bootstrap
npm ERR! #ng-bootstrap/ng-bootstrap#"^9.1.3" from the root project
npm ERR! 1 more (the root project)
npm ERR! peer #angular/common#"11.2.14" from #angular/platform-browser#11.2.14
npm ERR! node_modules/#angular/platform-browser
npm ERR! peer #angular/platform-browser#"11.2.14" from #angular/forms#11.2.14
npm ERR! node_modules/#angular/forms
npm ERR! peer #angular/forms#">=8.2.7" from #ionic/angular#5.6.10
npm ERR! node_modules/#ionic/angular
npm ERR! #ionic/angular#"^5.5.2" from the root project
npm ERR! 2 more (#ng-bootstrap/ng-bootstrap, the root project)
npm ERR! peer #angular/platform-browser#"11.2.14" from #angular/platform-browser-dynamic#11.2.14
npm ERR! node_modules/#angular/platform-browser-dynamic
npm ERR! #angular/platform-browser-dynamic#"~11.2.0" from the root project
npm ERR! 2 more (#angular/router, the root project)
npm ERR! 9 more (#angular/platform-browser-dynamic, #angular/router, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/common#"^12.0.0 || ^13.0.0-0" from #angular/cdk#12.1.1
npm ERR! node_modules/#angular/cdk
npm ERR! peer #angular/cdk#">=8.0.0" from ngx-sharebuttons#8.0.5
npm ERR! node_modules/ngx-sharebuttons
npm ERR! ngx-sharebuttons#"^8.0.5" from the root project
npm ERR! #angular/cdk#"^12.1.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #angular/common#13.3.11
npm ERR! node_modules/#angular/common
npm ERR! peer #angular/common#"^12.0.0 || ^13.0.0-0" from #angular/cdk#12.1.1
npm ERR! node_modules/#angular/cdk
npm ERR! peer #angular/cdk#">=8.0.0" from ngx-sharebuttons#8.0.5
npm ERR! node_modules/ngx-sharebuttons
npm ERR! ngx-sharebuttons#"^8.0.5" from the root project
npm ERR! #angular/cdk#"^12.1.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\spal\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\spal\AppData\Local\npm-cache\_logs\2022-09-07T06_41_40_704Z-debug-0.log
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd plugin add com.razorpay.cordova exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Ionic:
Ionic CLI : 6.20.1 (C:\Users\spal\AppData\Roaming\npm\node_modules\#ionic\cli)
Ionic Framework : #ionic/angular 5.6.10
#angular-devkit/build-angular : 0.1102.19
#angular-devkit/schematics : 11.2.14
#angular/cli : 11.2.14
#ionic/angular-toolkit : 7.0.0
Cordova:
Cordova CLI : 11.0.0
Cordova Platforms : android 9.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 18 other plugins)
Utility:
cordova-res : not installed globally
native-run : 1.4.0
System:
NodeJS : v16.17.0 (C:\Program Files\nodejs\node.exe)
npm : 8.15.0
OS : Windows 10

So I found a solution. I removed the git link of Razorpay in package.json and changed it to a version. That's it.
"com.razorpay.cordova": "^1.4.5",

Related

npm ERR! Failed at the fibers#3.1.1 install script

I'm getting this error
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fibers#3.1.1 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers#3.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\yaeesh\AppData\Roaming\npm-cache\_logs\2019-05-07T10_36_05_651Z-debug.log
I had the same problem, and fixed it by removing my latest nodejs, 12.3.1, and installing the last version of 11
https://nodejs.org/download/release/v11.15.0/

Install swagger-ui error

I get the following errors when I run docker build -t swagger-ui-builder:
npm ERR! Error: ENOENT, lstat '/build/node_modules/gulp-connect/node_modules/connect/node_modules/express-session/node_modules/crc/lib/crc16_ccitt.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 4.1.19-boot2docker
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /build
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /build/node_modules/gulp-connect/node_modules/connect/node_modules/express-session/node_modules/crc/lib/crc16_ccitt.js
npm ERR! fstream_path /build/node_modules/gulp-connect/node_modules/connect/node_modules/express-session/node_modules/crc/lib/crc16_ccitt.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 304 https://registry.npmjs.org/repeating
npm ERR! Error: ENOENT, lstat '/build/node_modules/gulp-connect/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/normalize-package-data/node_modules/semver/test/major-minor-patch.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 4.1.19-boot2docker
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /build
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /build/node_modules/gulp-connect/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/normalize-package-data/node_modules/semver/test/major-minor-patch.js
npm ERR! fstream_path /build/node_modules/gulp-connect/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/normalize-package-data/node_modules/semver/test/major-minor-patch.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/build/node_modules/gulp-connect/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/loud-rejection/node_modules/signal-exit/test/fixtures/parent.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 4.1.19-boot2docker
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /build
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /build/node_modules/gulp-connect/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/loud-rejection/node_modules/signal-exit/test/fixtures/parent.js
npm ERR! fstream_path /build/node_modules/gulp-connect/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/loud-rejection/node_modules/signal-exit/test/fixtures/parent.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, utime '/build/node_modules/gulp-connect/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/redent/node_modules/indent-string/node_modules/repeating/node_modules/is-finite/package.json'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 4.1.19-boot2docker
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /build
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /build/node_modules/gulp-connect/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/redent/node_modules/indent-string/node_modules/repeating/node_modules/is-finite/package.json
npm ERR! fstream_path /build/node_modules/gulp-connect/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/redent/node_modules/indent-string/node_modules/repeating/node_modules/is-finite/package.json
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call utimes
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
I am using Mac OS X. I try to install swagger-ui to apply to our project. after I downloaded swagger-ui to my local and cd to swagger-ui folder and "run $ docker build -t swagger-ui-builder ." and I got so many errors above.
I've found using this pre-built image works pretty easy:
docker run -d --name swagguer-ui -p 8888:8888 sjeandeaux/docker-swagger-ui
Or with your own default API URL:
docker run -d --name swagger-ui -p 8888:8888 -e "API_URL=YOUR_URL" sjeandeaux/docker-swagger-ui

Unable to install Plugman in iOS

I want to install Plugman in iOS for managing the Phonegap plugins. I am using the below command in Terminal.
npm install -g plugman
But I am getting the below error,
npm ERR! Error: EACCES, open '/Users/gtmac/.npm/npm/1.3.4/package/package.json'
npm ERR! { [Error: EACCES, open '/Users/gtmac/.npm/npm/1.3.4/package/package.json']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/gtmac/.npm/npm/1.3.4/package/package.json',
npm ERR! parent: 'plugman' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 14.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "plugman"
npm ERR! cwd /Users/gtmac/Documents/Sinu/Insightix
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /Users/gtmac/.npm/npm/1.3.4/package/package.json
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/Users/gtmac/.npm/npm/1.3.4/package/package.json'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/gtmac/Documents/Sinu/Insightix/npm-debug.log
npm ERR! not ok code 0
I solved the issue by running the command after executing 'sudo -s'
$ sudo -s
$ npm install -g plugman

Trouble with installing Bower

I am trying to install Bower. Need Bower to install zurb Foundation. I am a newbie in this, a UX designer learning the frontend.
npm install - g bower
npm ERR! Error: not_found document not found: -
npm ERR! at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:308:14)
npm ERR! at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:246:65)
npm ERR! at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:236:22)
npm ERR! at Request.emit (events.js:98:17)
npm ERR! at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1142:14)
npm ERR! at Request.emit (events.js:117:20)
npm ERR! at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1096:12)
npm ERR! at IncomingMessage.emit (events.js:117:20)
npm ERR! at _stream_readable.js:944:16
npm ERR! at process._tickCallback (node.js:442:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 12.6.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-" "g" "bower"
npm ERR! cwd /Users/anandka
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/anandka/npm-debug.log
npm ERR! not ok code 0
Thanks in advance :)
You have a typo, you must remove the space before the g option.
npm is not finding package -, so:
npm install -g bower

how to resolve the cordova installation issue

I am trying to create cordova using the terminal but I am getting following error.
So far I know this is the only user account which we had created and intact should
be the root account
install -g cordova
npm http GET https://registry.npmjs.org/cordova
npm http 304 https://registry.npmjs.org/cordova
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/cordova'
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/cordova']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/cordova',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/cordova',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "cordova"
npm ERR! cwd /Users/anantmac
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /usr/local/lib/node_modules/cordova
npm ERR! fstream_path /usr/local/lib/node_modules/cordova
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/cordova'
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/anantmac/npm-debug.log
npm ERR! not ok code 0
Anants-MacBook-Air:~ anantmac$
Sometimes when installing node packages you need to use sudo so everything can write to the paths required, try this:
sudo npm install -g cordova

Resources