[
https://issues.apache.org/jira/browse/CB-13536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16255359#comment-16255359
]
Lukas Plachy edited comment on CB-13536 at 11/16/17 2:03 PM:
-------------------------------------------------------------
- Yes, when installing into default directories, then the 'cordova create
cordova' works ok
- ad global installation .... what you are describing is not what I have tested
here ... the "global" instalation SHOULD mean, that the 'node_modules' + their
respective cmd scripts are installed in that directory, that is being used as
npm/nvm root directory for nodejs (typically C:\Program Files\nodejs). HOWEVER
when you use the "-g" argument, then npm or nodejs COMPLETLY IGNORES(!!!) its
settings from where it has been launched from, installed into or has set into
"%PATH%" and installs the module in question stubbornly into a constant path
C:\Users\%CURRENTUSER%\AppData\Roaming\npm (or nvm\vX.X.X. depending what
installation type you have done).
If you setup a different path for nodejs during install (lets say
'D:\MYDIRECTORY\nodejs' to use in this example) then the install launched with
"-g" neglects this settings as well (an will use - from my point of view very
wrongfully - the C:\Users\....\Roaming\npm again). BUT a "-g" install is
nothing else, than doing
cd D:\MYDIRECTORY\nodejs (excuse the brevity, of course first there should be
the disk change 'd:' and then the cd)
and performing a "local" install
D:\MYDIRECTORY\nodejs>npm install some_package
which however has some side effects (such as installing/updating the npm itself
for example, which then is not able to recreate the commandline 'npm.cmd'
scripts since they are in use in that moment).
So when the "-g" argument ignores the root path it should install the modules
into and sticks to the "Roaming" directory, which definitely is NOT a place for
installing runtimes (even those which might be considered document
data/libraries source such as the *.js files used on the nodejs platform), then
one has to force the installation to happen where it belongs to (eg. the
desired "root" directory of nodejs as specified during the originating MSI or
NVM install).
was (Author: rheingold):
- Yes, when installing into default directories, then the 'cordova create
cordova' works ok
- ad global installation .... what you are describing is not what I have tested
here ... the "global" instalation SHOULD mean, that the 'node_modules' + their
respective cmd scripts are installed in that directory, that is being used as
npm/nvm root directory for nodejs (typically C:\Program Files\nodejs). HOWEVER
when you use the "-g" argument, then npm or nodejs COMPLETLY IGNORES(!!!) its
settings from where it has been launched from, installed into or has set into
"%PATH%" and installs the module in question stubbornly into a constant path
C:\Users\%CURRENTUSER%\AppData\Roaming\npm (or nvm\vX.X.X. depending what
installation type you have done).
If you setup a different path for nodejs during install (lets say
'D:\MYDIRECTORY\nodejs' to use in this example) then the install launched with
"-g" neglects this settings as well (an will use - from my point of view very
wrongfully - the C:\Users\....\Roaming\npm again). BUT a "-g" install is
nothing else, than doing
cd D:\MYDIRECTORY\nodejs (excuse the brevity, of course first there should be
the disk change 'd:' and then the cd)
and performing a "local" install
D:\MYDIRECTORY\nodejs>npm install some_package
which however has some side effects (such as installing/updating the npm itself
for example, which then is not able to recreate the commandline 'npm.cmd'
scripts since they are in use in that moment).
So when the "-g" argument ignores the root path it should install into and
sticks to the "Roaming" directory, which definitely is NOT a place for
installing runtimes (even those which might be considered document
data/libraries source such as the *.js files used on the nodejs platform), then
one has to force the installation to happen where it belongs to (eg. the
desired "root" directory of nodejs as specified during the install).
> 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
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CB-13536
> URL: https://issues.apache.org/jira/browse/CB-13536
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-app-hello-world, cordova-cli
> Reporter: Lukas Plachy
> Attachments: 2017-11-03T12_42_43_016Z-debug_anonymized.log,
> 2017-11-14T14_08_29_042Z-debug.log, cordova_create_cordova.png,
> cordova_create_direct_MSI_install_std_dirs.png, cordova_create_on_empty.png,
> cordova_create_over_nvm_std_dirs.png, cordova_wrap_fail.png,
> nvm_cordova_create.png, nvm_install.png
>
>
> Hi, anybody an idea, whats wrong here (see attached image), before I'll have
> to make a deepdive into the sources? Such error does not help when doing
> first hands-on!
> Note: has been reported to and rejected by quasar as not quasar-related.
> Thanks
> [^cordova_wrap_fail.png]
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]