Reputation: 1
I have already struggled with this for a few weeks. None of my searches helped install phonegap till the end. Here's what shows when I try to install it:
D:\USERS\haraujo>npm -g install phonegap
npm WARN engine [email protected]: wanted: {"node":"~0.6.7"} (current: {"node":"0
.12.5","npm":"2.11.2"})
|
> [email protected] install D:\USERS\haraujo\AppData\Roaming\npm\node_modules\phoneg
ap\node_modules\cordova
> node bootstrap.js
shell.js: internal error
Error: ENOENT, no such file or directory 'D:\USERS\haraujo\AppData\Roaming\npm\n
ode_modules\phonegap\node_modules\cordova\D:'
at Error (native)
at Object.fs.mkdirSync (fs.js:747:18)
at mkdirSyncRecursive (D:\USERS\haraujo\AppData\Roaming\npm\node_modules\pho
negap\node_modules\cordova\node_modules\shelljs\shell.js:1629:8)
at mkdirSyncRecursive (D:\USERS\haraujo\AppData\Roaming\npm\node_modules\pho
negap\node_modules\cordova\node_modules\shelljs\shell.js:1634:3)
at mkdirSyncRecursive (D:\USERS\haraujo\AppData\Roaming\npm\node_modules\pho
negap\node_modules\cordova\node_modules\shelljs\shell.js:1634:3)
at mkdirSyncRecursive (D:\USERS\haraujo\AppData\Roaming\npm\node_modules\pho
negap\node_modules\cordova\node_modules\shelljs\shell.js:1634:3)
at mkdirSyncRecursive (D:\USERS\haraujo\AppData\Roaming\npm\node_modules\pho
negap\node_modules\cordova\node_modules\shelljs\shell.js:1634:3)
at mkdirSyncRecursive (D:\USERS\haraujo\AppData\Roaming\npm\node_modules\pho
negap\node_modules\cordova\node_modules\shelljs\shell.js:1634:3)
at mkdirSyncRecursive (D:\USERS\haraujo\AppData\Roaming\npm\node_modules\pho
negap\node_modules\cordova\node_modules\shelljs\shell.js:1634:3)
at mkdirSyncRecursive (D:\USERS\haraujo\AppData\Roaming\npm\node_modules\pho
negap\node_modules\cordova\node_modules\shelljs\shell.js:1634:3)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "phonegap"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node bootstrap.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node bootstrap.js'.
npm ERR! This is most likely a problem with the cordova package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node bootstrap.js
npm ERR! You can get their info via:
npm ERR! npm owner ls cordova
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\USERS\haraujo\npm-debug.log
I need to install this to test hybrid development for mobile devices.
Update:
I managed, via Git, to clone phonegap-cli, cordova-cli, bootstrap and tried installing again without the -g flag. Got the following messages:
D:\USERS\haraujo>npm install phonegap-cli
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install" "phonegap-cli"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! code ECONNRESET
npm ERR! network tunneling socket could not be established, cause=Parse Error
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! Please include the following file with any support request:
npm ERR! D:\USERS\haraujo\npm-debug.log
Upvotes: 0
Views: 366
Reputation: 1669
I wrote down all the things I did for my own PhoneGap installation (which was successful).
net use n: \\mycomputer\c$\some\really\long\path\Node.js\
c:
cd \users\Me\AppData\roaming\npm\bin
npm install -g phonegap
(manually had to fix failed native Microsoft projects since I have two Visual Studio installs)
n:
cd heroku
phonegap create MyAppName
Hope this helps. Mapping a drive into a deep subdirectory structure sometimes helps given that Microsoft has a maximum path length of something like 260 characters or so.
UPDATE TO MATCH YOUR NEW ERROR:
Try instead: "npm install -g phonegap-cli"
Upvotes: 1
Reputation: 1
I received the same error.
Before issuing the 'npm install -g phonegap@latest' command, I changed my current directory to npm directory under node_modules and it worked. Please see below:
set APPDATA=D:\mobile\appdata
(my nodejs installed to D:\mobile\nodejs)
(my npm installed to D:\mobile\nodejs\node_modules\npm)
(So, moved my current directory as follows)
cd D:\mobile\nodejs\node_modules\npm
npm install -g phonegap@latest
Please let me know if it works for you.
Upvotes: 0
Reputation: 1669
On Windows you're often restricted from writing to the Program Files area if you're a standard user.
Noting this part of the errors:
argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "phonegap"
...it looks like it's trying to find node and npm somewhere there.
You might try starting a command prompt as Administrator and seeing if you may then install again that: npm -g install phonegap.
Start -> type "cmd" in the search area and then right-mouse click Command Prompt and choose Run As Administrator
Upvotes: 0