Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

phonegap create <dir> Fails on windows #491

Closed
jd-carroll opened this issue Nov 26, 2014 · 5 comments
Closed

phonegap create <dir> Fails on windows #491

jd-carroll opened this issue Nov 26, 2014 · 5 comments
Labels

Comments

@jd-carroll
Copy link

I just updated to the latest Phonegap-cli, and any time I try to create a new project it fails.

The issue seems to be incorrect handling of the roam appdir used by npm to cache all of the modules. However, I'm not sure where to look in the code to figure this out. The user I am using on windows is: "Joseph Carroll".

Joseph Carroll@JOSEPHCARROLL /c/dev/test
$ phonegap -v
3.6.3-0.22.6

Joseph Carroll@JOSEPHCARROLL /c/dev/test
$ phonegap create sample
'c:\Users\Joseph' is not recognized as an internal or external command,
operable program or batch file.

If I create a new user "Joseph", the above command works without issues.
As a note: I was testing this using the gitbash, switching to the windows command it is no different.

JD

@jd-carroll
Copy link
Author

Also for reference, the roaming appdir is located:
C:\Users\Joseph Carroll\AppData\roaming\npm

@mwbrooks
Copy link
Collaborator

@jd-carroll thanks for submitting the issue. I'm not a primary Windows users, so it's difficult to uncover these kind of issues without the help of the community!

By the looks of it, the space is causing the command to fail. I'll create a new user account and see if I can reproduce your issue!

@mwbrooks
Copy link
Collaborator

@jd-carroll your hunch was correct that the roaming directory reference was broken due to the space in your username.

I've patched this issue in the above commit. It's now published and available on npm as phonegap@4.1.2-0.22.8.

Cheers!
Michael

@jd-carroll
Copy link
Author

Thanks for the fix!

After upgrading I started seeing the following:

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
 To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.  [C:\Users\Joseph Carroll\AppData\Roaming\npm\node_modu
les\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\
socket.io-client\node_modules\engine.io-client\node_modules\ws\build\binding.sl
n]
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
 To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.  [C:\Users\Joseph Carroll\AppData\Roaming\npm\node_modu
les\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\
socket.io-client\node_modules\engine.io-client\node_modules\ws\build\binding.sl
n]

In case anyone else runs into this, check out the following link:
http://stackoverflow.com/questions/14278417/cannot-install-node-modules-that-require-compilation-on-windows-7-x64-vs2012

After running npm rebuild phonegap --msvs_version=2012 it seems to be working fine.

If that doesn't work try installing the SDK as described here:
http://stackoverflow.com/questions/7761395/where-is-vcbuild-in-vs2010

JD

@mwbrooks
Copy link
Collaborator

mwbrooks commented Dec 1, 2014

Crazy, thanks for the including that solution @jd-carroll!

What terminal or Command Prompt are you using? There a lot of options in Windows: Command Prompt, Command Prompt for Node.js, Command Prompt for Visual Studio, Cygwin, Gitbash, or something else?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants