First time ionic cordova installation problem

Hello, I’m someone not familar with forums not ionic. I’m been having trouble setting up ionic on my Mac for the past few days. I first downloaded Node.js version: v0.12.7 (stable) as recommended. Basically, when I do sudo npm install -g ionic cordova or sudo npm install -g ionic, or sudo npm install -g cordova, I get:

npm WARN engine cordova-js@4.0.0: wanted: {“node”:"~0.10.x"} (current: {“node”:“0.12.7”,“npm”:“2.11.3”})
npm WARN engine npm@1.3.4: wanted: {“node”:">=0.6",“npm”:“1”} (current: {“node”:“0.12.7”,“npm”:“2.11.3”})
npm WARN engine xmlbuilder@2.2.1: wanted: {“node”:“0.8.x || 0.10.x”} (current: {“node”:“0.12.7”,“npm”:“2.11.3”})
npm WARN engine cordova-js@4.0.0: wanted: {“node”:"~0.10.x"} (current: {“node”:“0.12.7”,“npm”:“2.11.3”})
npm WARN engine npm@1.3.4: wanted: {“node”:">=0.6",“npm”:“1”} (current: {“node”:“0.12.7”,“npm”:“2.11.3”})
npm WARN engine xmlbuilder@2.2.1: wanted: {“node”:“0.8.x || 0.10.x”} (current: {“node”:“0.12.7”,“npm”:“2.11.3”})
npm WARN installMany normalize-package-data was bundled with npm@1.3.4, but bundled package wasn’t found in unpacked tree
/usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova
npm WARN installMany normalize-package-data was bundled with npm@1.3.4, but bundled package wasn’t found in unpacked tree
/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic
cordova@5.1.1 /usr/local/lib/node_modules/cordova
├── q@1.0.1
├── underscore@1.7.0
├── nopt@3.0.1 (abbrev@1.0.7)
└── cordova-lib@5.1.1 (osenv@0.1.0, valid-identifier@0.0.1, properties-parser@0.2.3, bplist-parser@0.0.6, mime@1.2.11, unorm@1.3.3, semver@2.1.0, shelljs@0.3.0, rc@0.5.2, through2@0.6.3, dep-graph@1.1.0, npmconf@0.1.16, xcode@0.6.7, d8@0.4.4, elementtree@0.1.6, glob@4.0.6, cordova-registry-mapper@1.1.9, tar@1.0.2, init-package-json@1.7.1, request@2.47.0, plist@1.1.0, cordova-js@4.0.0, cordova-app-hello-world@3.9.0, npm@1.3.4)

ionic@1.6.4 /usr/local/lib/node_modules/ionic
├── connect-livereload@0.5.2
├── proxy-middleware@0.7.0
├── progress@1.1.7
├── colors@0.6.2
├── open@0.0.5
├── ncp@0.4.2
├── underscore@1.7.0
├── crc@3.2.1
├── q@1.0.1
├── async@0.9.2
├── shelljs@0.2.6
├── semver@4.3.6
├── cross-spawn@0.2.3 (lru-cache@2.6.5)
├── finalhandler@0.2.0 (escape-html@1.0.1, debug@2.0.0)
├── optimist@0.6.0 (wordwrap@0.0.3, minimist@0.0.10)
├── event-stream@3.0.20 (duplexer@0.1.1, stream-combiner@0.0.4, from@0.1.3, pause-stream@0.0.11, split@0.2.10, through@2.3.8, map-stream@0.0.6)
├── connect@3.1.1 (utils-merge@1.0.0, parseurl@1.3.0, debug@1.0.4, finalhandler@0.1.0)
├── form-data@0.1.4 (mime@1.2.11, combined-stream@0.0.7)
├── opbeat-ionic@1.1.3 (console-log-level@1.1.0, json-stringify-safe@5.0.1, after-all@2.0.2, stackman@0.2.3)
├── serve-static@1.7.1 (utils-merge@1.0.0, escape-html@1.0.1, parseurl@1.3.0, send@0.10.1)
├── cli-table@0.3.1 (colors@1.0.3)
├── tiny-lr-fork@0.0.5 (debug@0.7.4, faye-websocket@0.4.4, qs@0.5.6, noptify@0.0.3)
├── request@2.51.0 (caseless@0.8.0, aws-sign2@0.5.0, forever-agent@0.5.2, oauth-sign@0.5.0, tunnel-agent@0.4.1, stringstream@0.0.4, json-stringify-safe@5.0.1, qs@2.3.3, node-uuid@1.4.3, mime-types@1.0.2, combined-stream@0.0.7, http-signature@0.10.1, tough-cookie@2.0.0, bl@0.9.4, hawk@1.1.1, form-data@0.2.0)
├── prompt@0.2.12 (revalidator@0.1.8, pkginfo@0.3.0, read@1.0.6, winston@0.6.2, utile@0.2.1)
├── unzip@0.1.9 (setimmediate@1.0.2, pullstream@0.4.1, match-stream@0.0.2, readable-stream@1.0.33, binary@0.3.0, fstream@0.1.31)
├── vinyl-fs@0.3.7 (graceful-fs@3.0.8, vinyl@0.4.6, mkdirp@0.5.1, strip-bom@1.0.0, through2@0.6.5, glob-stream@3.1.18, lodash@2.4.2, glob-watcher@0.0.6)
├── cheerio@0.19.0 (dom-serializer@0.1.0, entities@1.1.1, css-select@1.0.0, htmlparser2@3.8.3, lodash@3.10.0)
├── xml2js@0.4.4 (sax@0.6.1, xmlbuilder@2.6.4)
├── gulp@3.8.8 (pretty-hrtime@0.2.2, interpret@0.3.10, deprecated@0.0.1, archy@0.0.2, minimist@1.1.2, semver@3.0.1, tildify@1.1.0, orchestrator@0.3.7, chalk@0.5.1, gulp-util@3.0.6, liftoff@0.12.1)
├── npm@2.1.3
└── ionic-app-lib@0.3.8 (vinyl-fs@1.0.0, archiver@0.5.2, ionic-cordova-lib@5.1.7)

Note: I already tried doing: sudo npm install -g cordova@4.0.0 and getting a similar error. Some places have suggested that this might happen if npm is not up to date. But I’m not sure how to check that…

Any help would be appreciated! :smile:

What error? I can see only warnings.

Oh…basically none of the add platform functions were working after this were working so I thought that cordova wasn’t installed properly…I apologize about that…Because after create any project, if I do - ionic platform add ios , or the android part, I get this:
Error { [Error: ENOENT, no such file or directory ‘/Users/Prasuna/hooks’]
errno: -2,
code: ‘ENOENT’,
path: ‘/Users/Prasuna/hooks’,
syscall: ‘scandir’ }
Updated the hooks directory to have execute permissions
Downloading Default Ionic Resources
Downloading: https://github.com/driftyco/ionic-default-resources/archive/master.zip
[=============================] 100% 0.0s
Done adding default Ionic resources
✗ Error reading config file: Error: ENOENT, open 'config.xml’
Error happened: undefined
Error happened undefined

ionic platform add ios or ionic platform add android are not global commands, they must be run in a project directory.

Extremely late in replying and saying Thank you but hoping it’s better late than never. I gave up on the whole framework and quit it but decided to come back to it.

Thanks for catching the silly mistake I made of calling them outside the project directories. I can now manage to emulate the IOS platform!