0

c:>npm install -g cordova

npm ERR! fetch failed https://registry.npmjs.org/dep-graph/-/dep-graph-1.1.0.tgz

npm ERR! fetch failed https://registry.npmjs.org/npmconf/-/npmconf-0.1.16.tgz
npm ERR! fetch failed https://registry.npmjs.org/rc/-/rc-0.3.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/xcode/-/xcode-0.6.6.tgz
npm ERR! fetch failed https://registry.npmjs.org/dep-graph/-/dep-graph-1.1.0.tgz

npm ERR! fetch failed https://registry.npmjs.org/xcode/-/xcode-0.6.6.tgz
npm ERR! fetch failed https://registry.npmjs.org/npmconf/-/npmconf-0.1.16.tgz
npm ERR! fetch failed https://registry.npmjs.org/rc/-/rc-0.3.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/xcode/-/xcode-0.6.6.tgz
npm ERR! fetch failed https://registry.npmjs.org/rc/-/rc-0.3.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/dep-graph/-/dep-graph-1.1.0.tgz

npm ERR! fetch failed https://registry.npmjs.org/npmconf/-/npmconf-0.1.16.tgz
npm ERR! Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR!     at SecurePair.<anonymous> (tls.js:1365:32)
npm ERR!     at SecurePair.emit (events.js:92:17)
npm ERR!     at SecurePair.maybeInitFinished (tls.js:977:10)
npm ERR!     at CleartextStream.read [as _read] (tls.js:469:13)
npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:323:10)
npm ERR!     at EncryptedStream.write [as _write] (tls.js:366:25)
npm ERR!     at doWrite (_stream_writable.js:226:10)
npm ERR!     at writeOrBuffer (_stream_writable.js:216:5)
npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:183:11)
npm ERR!     at write (_stream_readable.js:585:24)
npm ERR!     at flow (_stream_readable.js:594:7)
npm ERR!     at Socket.pipeOnReadable (_stream_readable.js:626:5)
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 Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! cwd c:\
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! Error: EPERM, open 'c:\npm-debug.log'
npm ERR!  { [Error: EPERM, open 'c:\npm-debug.log'] errno: 50, code: 'EPERM', pa
th: 'c:\\npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! cwd c:\
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path c:\npm-debug.log
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, open 'c:\npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     c:\npm-debug.log
npm ERR! not ok code 0

I tried below command in cli

c:>npm config set strict-ssl false

and then executed command

c:>npm install -g cordova

It gives following result

C:\Users\e01005\AppData\Roaming\npm\cordova -> C:\Users\e01005\AppData\Roaming\n
pm\node_modules\cordova\bin\cordova
cordova@3.5.0-0.2.4 C:\Users\e01005\AppData\Roaming\npm\node_modules\cordova
├── q@0.9.7
├── underscore@1.4.4
├── optimist@0.6.0 (wordwrap@0.0.2, minimist@0.0.10)
└── cordova-lib@0.21.3 (osenv@0.0.3, bplist-parser@0.0.5, mime@1.2.11, semver@2.
0.11, shelljs@0.1.4, plist-with-patches@0.5.1, dep-graph@1.1.0, rc@0.3.0, elemen
ttree@0.1.5, xcode@0.6.6, glob@3.2.9, npmconf@0.1.16, tar@0.1.19, request@2.22.0
, npm@1.3.4)

and when I run command cordova create hello com.example.hello HelloWorld

it says

'cordova' is not recognized as an internal or external command, operable program or batch file.

I not getting whats the issue why it not allow me to create the projects some time it create project but not allow to add platform.

Environment variable PATH value is

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\adt-bundle-windows-x86_64-20130729\sdk\tools;C:\Program Files (x86)\adt-bundle-windows-x86_64-20130729\sdk\platform-tools;C:\Program Files\nodejs\

Davinder
  • 1
  • 1
  • 2

2 Answers2

1

I had the same problem and using

npm install -g phonegap

npm fetched and installed cordova successfully

Rafael
  • 11
  • 1
0

Install git before installing Cordova. In the background, it downloads from Git.

Tirtha R
  • 1,148
  • 1
  • 14
  • 24