[ 
https://issues.apache.org/jira/browse/CB-13507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16412043#comment-16412043
 ] 

Warren Crossing commented on CB-13507:
--------------------------------------

That's because git+ssh is not a url protocol recognised by the old url.js so it 
assumes that was a relative directory.  Good to see you actually did some 
debugging. 

 

Did you see all the happy-go-lucky code to guess where npm installed the actual 
clone into node_modules/\{{package-name}} as npm never reports the resultant 
node_modules directory path of the "npm add".   That directory name is the 
package name and not necessarily the path at the end of the url.   

 

Did you try the 2 step work around above i.e. clone first and add a relative 
directory? 

Hopefully a contributor will see the gap and solve the problem with a formal 
solution. 

I believe that npm should return a result fragment (in yaml/json) when 
triggered with the --robot flag.

> git+https or git+ssh fails when trying to install
> -------------------------------------------------
>
>                 Key: CB-13507
>                 URL: https://issues.apache.org/jira/browse/CB-13507
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: AllPlatforms
>    Affects Versions: 7.0.2
>         Environment: I am selecting 7.0.2 since it's the closest but I am 
> running cordova 7.1.0
> OS: Mac OS X Sierra.
> Although I don't think it has anything to do with cordova-ios and 
> cordova-android, my platform versions are: 
> - android 6.3.0
> - ios 4.5.2
>            Reporter: Pablo Caselas
>            Priority: Major
>             Fix For: 7.0.2
>
>
> I start with adding plugin dependencies with https://...... on package.json 
> (no plugin references on config.xml) and no platforms or plugins installed 
> then I run "cordova platform ios".
> It installs the plugins without any problem, but changes config.xml and 
> package.json plugin references from https to git+https, and ssh to git+ssh.
> Failed to restore plugin "cordova-plugin-document-viewer" from config.xml. 
> You might need to try adding it again. Error: Failed to fetch plugin 
> git+https://github.com/kas84/cordova-plugin-document-viewer.git via registry



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to