Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Windows 7 Pro 64b (CZE)
Description
Im afraid that the line https://github.com/apache/cordova-create/blob/53d5894c849193073e65727033e27c8d2e428ac8/index.js#L191 needs serious redesign.
When one installs nodejs repository (containing the node_modules global repository, where the cordova is installed using the command 'npm install -g cordova') on such a path, that contains a '@' (at) such a for example 'D:\Directory1\ @Directory2\nodejs', then the variable 'isNPM' is evaluated mistakingly as 'true' and a complete different code block is executed than it should be.
When doing a 'cordova create' from a locally installed template, then the lines https://github.com/apache/cordova-create/blob/53d5894c849193073e65727033e27c8d2e428ac8/index.js#L193-L212 must NOT be run (or at least they throw an error when being called on a local directory)!!!!! But they run, when I have nodejs in a path containing '@'.
Im sorry, but myself I have not evaluated what is the purpose of these lines and why they are evaluated based on the "@", but a "@" sign is a legal character in a directory name in Windows, so I expect that this should be reflected by the evaluation of isNPM on line 191. Thankx much to those, who might have some clue how to edit this code appropriately, since I would not dare to do so.
Attachments
Issue Links
- is a child of
-
CB-13536 cordova being called from "quasar wrap" not working - cordova-realted error when not installed in default directory: Could not install from (path_of_nodejs_modules) as it does not contain a package.json file
- Closed
-
CB-13588 cordova-create fails to copy template on Windows when nodejs global node_modules are installed in a different directory than the default one (AppData\Roaming)
- Closed