[
https://issues.apache.org/jira/browse/CB-13590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lukas Plachy updated CB-13590:
------------------------------
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.
was:
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.
> When installed in a nodejs dir that is on a path containing a '@', then
> cordova-create fails with the error: Could not install from
> (path_of_nodejs_modules) as it does not contain a package.json file
> (observable also from a call from quasar wrap cordova)
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CB-13590
> URL: https://issues.apache.org/jira/browse/CB-13590
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-create
> Environment: Windows 7 Pro 64b (CZE)
> Reporter: Lukas Plachy
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]