[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2018-05-10 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12774:
-

cthos commented on issue #602: CB-12774 : Don't munge scoped plugin IDs 
anymore. Comment requested.
URL: https://github.com/apache/cordova-lib/pull/602#issuecomment-388168137
 
 
   I'd very much like to be able to do this, given it's a good way to have 
private cordova plugins (either through a mirror or npm's privately scoped 
packages offering) - and adding plugins via private git urls is also not 
particularly functional.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>Priority: Major
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



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

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2018-04-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12774:
-

tobilarscheid commented on issue #602: CB-12774 : Don't munge scoped plugin IDs 
anymore. Comment requested.
URL: https://github.com/apache/cordova-lib/pull/602#issuecomment-381590322
 
 
   This actually sounds like a good thing to merge - what is blocking us? :-)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>Priority: Major
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



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

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2018-04-16 Thread Tobias Larscheid (JIRA)

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

Tobias Larscheid commented on CB-12774:
---

Hi everyone, any updates on this?

> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>Priority: Major
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



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

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-11-21 Thread Marian Hello (JIRA)

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

Marian Hello commented on CB-12774:
---

thanks will do

> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-11-21 Thread Jan Piotrowski (Sujan) (JIRA)

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

Jan Piotrowski (Sujan) commented on CB-12774:
-

Got it. Was confused because the term "global package" has a meaning with npm.

I think your description problem is different and specific enough for you to 
create a new issue about it. Copy over all your text, link to this issue in the 
description for reference. Better to handle your thing separately so it doesn't 
get lost here in the comments. Thanks.

> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-11-21 Thread Marian Hello (JIRA)

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

Marian Hello commented on CB-12774:
---

Sorry I made up that term. What I ment is that if there is unscoped package 
with same as scoped package, it will be installed.
So you ended up with two packages.

How to reproduce:

1. create new cordova project:
cordova create myApp org.apache.cordova.myApp myApp
2. add plaftofm
cordova platform add android
3. install scoped package:
cordova plugin add @mauron85/cordova-plugin-background-geolocation@3.0.0-alpha.4

Expected Behavior
Only single package @mauron85/cordova-plugin-background-geolocation will be 
installed

Actual Behaviour
Two packages will get installed:
1. @mauron85/cordova-plugin-background-geolocation - 
https://www.npmjs.com/package/@mauron85/cordova-plugin-background-geolocation
2. cordova-plugin-background-geolocation - 
https://www.npmjs.com/package/cordova-plugin-background-geolocation

They are completely different and incompatible. As result cordova project won't 
compile.


Output from:


> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-11-21 Thread Jan Piotrowski (Sujan) (JIRA)

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

Jan Piotrowski (Sujan) commented on CB-12774:
-

Just to clarify: What do you mean by "global package"?

> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-11-20 Thread Marian Hello (JIRA)

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

Marian Hello commented on CB-12774:
---

I've identified another possible problem.
I've published scoped package @mauron85/cordova-plugin-background-geolocation 
to npm:

When I do:
cordova plugin add @mauron85/cordova-plugin-background-geolocation@3.0.0-alpha.4

There will be additional unwanted and conflicting package installed:

"cordova-plugin-background-geolocation": "^1.0.6",
"cordova-plugin-geolocation": "^3.0.0",

cordova-plugin-geolocation is dependency of 
cordova-plugin-background-geolocation so that's explainable,

but the real problem here is that apart from scoped package also global package 
was installed.




> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-11-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12774:
-

akdor1154 commented on issue #602: CB-12774 : Don't munge scoped plugin IDs 
anymore. Comment requested.
URL: https://github.com/apache/cordova-lib/pull/602#issuecomment-341275433
 
 
   ahh Windows..


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>Priority: Major
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-10-25 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12774:
-

Github user audreyso commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/602#discussion_r147014589
  
--- Diff: src/cordova/util.js ---
@@ -255,11 +255,20 @@ function findPlugins (pluginDir) {
 var plugins = [];
 
 if (fs.existsSync(pluginDir)) {
-plugins = fs.readdirSync(pluginDir).filter(function (fileName) {
-var pluginPath = path.join(pluginDir, fileName);
-var isPlugin = isDirectory(pluginPath) || 
isSymbolicLink(pluginPath);
-return fileName !== '.svn' && fileName !== 'CVS' && isPlugin;
-});
+plugins = fs.readdirSync(pluginDir)
+.reduce(function (plugins, pluginOrScope) {
+if (pluginOrScope[0] === '@') {
+plugins.push(...fs.readdirSync(path.join(pluginDir, 
pluginOrScope)).map(s => path.join(pluginOrScope, s)));
--- End diff --

Thanks for your question! We are sticking to the current style for now. We 
need to have a discussion on our mailing list about starting to use es2015 
features/ which ones to use and get some consensus.


> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-10-25 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12774:
-

Github user akdor1154 commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/602#discussion_r147012928
  
--- Diff: src/cordova/util.js ---
@@ -255,11 +255,20 @@ function findPlugins (pluginDir) {
 var plugins = [];
 
 if (fs.existsSync(pluginDir)) {
-plugins = fs.readdirSync(pluginDir).filter(function (fileName) {
-var pluginPath = path.join(pluginDir, fileName);
-var isPlugin = isDirectory(pluginPath) || 
isSymbolicLink(pluginPath);
-return fileName !== '.svn' && fileName !== 'CVS' && isPlugin;
-});
+plugins = fs.readdirSync(pluginDir)
+.reduce(function (plugins, pluginOrScope) {
+if (pluginOrScope[0] === '@') {
+plugins.push(...fs.readdirSync(path.join(pluginDir, 
pluginOrScope)).map(s => path.join(pluginOrScope, s)));
--- End diff --

yup just started looking at the failed test :) While you're here and kind 
of related, I noticed most of the Cordova codebase avoids `() => arrow 
functions`. Is this just historical? I have used full `function () { }` when 
I've paid attention just to match code style, but is this necessary?


> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-10-25 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12774:
-

Github user audreyso commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/602#discussion_r147012615
  
--- Diff: src/cordova/util.js ---
@@ -255,11 +255,20 @@ function findPlugins (pluginDir) {
 var plugins = [];
 
 if (fs.existsSync(pluginDir)) {
-plugins = fs.readdirSync(pluginDir).filter(function (fileName) {
-var pluginPath = path.join(pluginDir, fileName);
-var isPlugin = isDirectory(pluginPath) || 
isSymbolicLink(pluginPath);
-return fileName !== '.svn' && fileName !== 'CVS' && isPlugin;
-});
+plugins = fs.readdirSync(pluginDir)
+.reduce(function (plugins, pluginOrScope) {
+if (pluginOrScope[0] === '@') {
+plugins.push(...fs.readdirSync(path.join(pluginDir, 
pluginOrScope)).map(s => path.join(pluginOrScope, s)));
--- End diff --

Hi! This line will need to be changed as it will not work with Node 4, 
which is still currently supported. 
http://node.green/#ES2015-syntax-spread---operator-with-generic-iterables--in-calls


> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-10-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12774:
-

GitHub user akdor1154 opened a pull request:

https://github.com/apache/cordova-lib/pull/602

CB-12774 : Don't munge scoped plugin IDs anymore. Comment requested.

In order to get plugins that are under an npm scope (e.g. 
`@akdor1154/some-plugin`) to install, a previous change from took the approach 
to consider such a plugin to be called (have the id) `some-plugin` instead of 
`@akdor1154/some-plugin`. This allowed scoped plugins to install and preserved 
the assumption that plugins will always be installed in 
`plugins_dir/[plugin_id]`.

However, it required special parsing logic around `npm` package IDs, and it 
broke the assumption that the `name` in an npm plugin's `package.json' would 
correspond to Cordova's idea of a plugin ID. IMO this approach is the source of 
further complexity which is not required, and is leading to weird bugs and 
special cases with scoped plugins. (see the linked issue, but there is stuff as 
basic as "`npm install` no longer works after installing a scoped plugin")

This PR changes approach - such plugins are now considered to have the id 
`@akdor1154/some-plugin`, in agreement with how npm treats such packages. This 
allows almost all special cases for scoped packages to be removed (yay). The 
key difference in behaviour as a result of this, though, is that while plugins 
are still installed in `plugins_dir/[plugin_id]`, `[plugin_id]` may no longer 
be a single directory, leading to plugin directories that look like
```
plugins
|- @akdor1154
|   |- some-plugin
|- cordova-some-other-plugin
```

Most of the logic changes in this PR are based around making this change 
work.

It's largely done how I want it, but I guess maintainers probably have 
strong opinions over whether this is the right way to go or not. Because of 
this I've left some commits in marked as TEMP that are for my own workflow. 
Please keep in mind I'll remove these. The only one you should be mindful of is 
the monkey patch to `cordova-common`; this would need to be raised in a 
separate PR to cordova-common if this change was approved in principle.


### Platforms affected
All

### What testing has been done on this change?
New end-to-end integration tests including a proper scoped plugin fixture
Unit tests on scoped plugins
Unit tests for plugman metadata

### Checklist
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
- [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
- [x] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/akdor1154/cordova-lib simple-scopes

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-lib/pull/602.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #602


commit 9c1c320d72bf2860f95bd9330ffd7718cdabba82
Author: Jarrad Whitaker 
Date:   2017-10-20T06:55:44Z

change scope behaviour to consider scopes to be part of the package name

commit 67dbb75fa96de8486418dd0a0bfbaa22300690d5
Author: Jarrad Whitaker 
Date:   2017-10-20T07:07:56Z

remove extraneous done callback from scope plugin tests

commit c6f681cc4df5fd4a5bd246df00a62753244c
Author: Jarrad Whitaker 
Date:   2017-10-20T08:40:08Z

add scoped plugin testcase

commit c2346e062518c639381ac167ba60a169500501eb
Author: Jarrad Whitaker 
Date:   2017-10-20T08:41:46Z

allow scoped plugins to exist in a dir structure reflecting there name, 
c.f. npm

commit 14c3f74a0d9033dfb250bc7b698e18eb226bf544
Author: Jarrad Whitaker 
Date:   2017-10-20T08:42:07Z

add an integration test to check scoped plugin add+remove

commit 0e383f9b419c5aa22bbacb456c0ff38649e1
Author: Jarrad Whitaker 
Date:   2017-10-20T08:43:14Z

TEMP lint with typescript

commit 7018c13a635b46364b34cf4378c78c60a1012f8b
Author: Jarrad Whitaker 
Date:   2017-10-20T08:42:27Z

TEMP override plugin discovery in cordova-common

commit 7aad7297f7306b380761e01017c067b31beca4a7
Author: Jarrad Whitaker 
Date:   2017-10-23T06:23:14Z

fix get_fetch_metadata to not guess plugins_dir anymore

commit 

[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-10-22 Thread Jarrad Whitaker (JIRA)

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

Jarrad Whitaker commented on CB-12774:
--

There was a previous PR that attempted to add support for NPM scopes but it 
took (IMO) a fundamentally mistaken approach - for a plugin @scope/plugin-id, 
it takes the plugin id as simply "plugin-id", where instead IMO it should be 
"@scope/plugin-id" in full (and plugin.xml should have @scope/plugin-id as 
well, once more IMO). NPM takes the second approach, and these differing 
approaches are what seems to be causing conflict.

I will raise a PR to address this.

> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-10-22 Thread Jarrad Whitaker (JIRA)

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

Jarrad Whitaker commented on CB-12774:
--

Seeing really weird behaviour.
With plugin id = package.json name = 
`@akdor1154/cordova-plugin-example-scoped-id`:

If I follow Michael's instructions with a fresh project and no platforms I 
actually get success, with the plugin installed in 
`plugins/@akdor1154/cordova-plugin-example-scoped-id`.

If I add a platform (browser) first, then I get the 404 referenced above.

If I add the platform (browser) after adding the plugin, I also get the 404 
above, and furthermore this stops the browser platform being added properly (I 
guess there is other stuff that gets aborted if plugin installation fails).

If I try to remove the plugin I get `Error: Plugin 
"@akdor1154/cordova-plugin-example-scoped-id" is not present in the project. 
See \`cordova plugin list\`.`

`cordova plugin lists` returns no plugins installed.

With package.json name = `@akdor1154/cordova-plugin-example-bare-id` and plugin 
id = `cordova-plugin-example-bare-id`:

Installing with no platforms:
Installation succeeds, package.json has npm dependencies: 
`"@akdor1154/cordova-plugin-example-bare-id": "^1.0.0"` and cordova plugins 
`"cordova-plugin-example-bare-id": {}`.

Adding `browser` subsequently:
No errors in console, however package.json now has 
`"cordova-plugin-example-bare-id": 
"@akdor1154/cordova-plugin-example-bare-id@~1.0.0"` in its NPM dependencies 
(why?? This is where the npm error Michael referenced above is coming from), 

`cordova plugin remove cordova-plugin-example-bare-id` fails (after rm 
node_modules) with the npm error as well,
```
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ENOLOCAL
npm ERR! Could not install from 
"@akdor1154/cordova-plugin-example-bare-id@~1.0.0" as it does not contain a 
package.json file.
```

`cordova plugin remove @akdor1154/cordova-plugin-example-bare-id` fails with 
`Error: Plugin "@akdor1154/cordova-plugin-example-bare-id" is not present in 
the project. See \`cordova plugin list\``.


> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
>  Labels: cordova-8.0.0
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-06-18 Thread Enrico Mazzucchelli (JIRA)

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

Enrico Mazzucchelli commented on CB-12774:
--

Any update?

> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12774) cordova plugin add doesn't support npm scope

2017-06-02 Thread Michael Asimakopoulos (JIRA)

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

Michael Asimakopoulos commented on CB-12774:


Getting similar behavior when trying to install scoped package from npmjs.com 
private package.

cordova plugin add @companyName/pluginname works outputing: 
Adding pluginname to package.json
Saved plugin info for "pluginname" to config.xml

Package json has a new dependency:
> @companyName/pluginname": "^2.3.0"
and a new entry in cordova section:
> "pluginname": {}
Config.xml has a new entry:
>  

But deleting node_modules and plugins folders (or checking out project in a 
clean directory) and running npm install gives an error 

> Could not install from "@companyName/pluginname@2.3.0" as it does not contain 
> a package.json file.

> cordova plugin add doesn't support npm scope
> 
>
> Key: CB-12774
> URL: https://issues.apache.org/jira/browse/CB-12774
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
>Affects Versions: 1.1.0
>Reporter: Enrico Mazzucchelli
> Fix For: 1.1.1
>
>
> STEP TO REPRODUCE:
> 1) setup a private repo (for example sinopia with docker: 
> https://github.com/kfatehi/docker-sinopia)
> 2) add scope in your npm config:  npm config set @myco:registry 
> http://0.0.0.0:4873/
> 3) create you plugin. In package.json set name: @myco/my.co.plugin.demo; in 
> plugin.xml set plugin id: @myco/my.co.plugin.demo.
> 3) publish plugin in your private repo:
> - npm set registry http://0.0.0.0:4873
> - npm publish
>-  npm set registry https://registry.npmjs.org/
> 4) in your cordova project dir, exec:
> cordova plugin add @myco/my.co.plugin.demo
> EXPECTED BEHAVIOR:
>   cordova plugin are installed 
> ACTUAL BEHAVIOR:
>   cordova installation failed:
>   Error: Failed to fetch plugin my.co.plugin.demo via registry.
>   Probably this is either a connection problem, or plugin spec is incorrect.
>   Check your connection and plugin name/version/URL.
>   Error: npm: Command failed with exit code 1 Error output:
>   npm ERR! code E404
>   npm ERR! 404 Registry returned 404 for GET on 
> https://registry.npmjs.org/my.co.plugin.demo
>   npm ERR! 404 
>   npm ERR! 404  'com.vipera.de.foundation.commons' is not in the npm registry.
>   npm ERR! 404 You should bug the author to publish it (or use the name 
> yourself!)
>   npm ERR! 404 
>   npm ERR! 404 Note that you can also install from a
>   npm ERR! 404 tarball, folder, http url, or git url.
> However node module are correctly installed (verified with npm ls) and 
> fetch.json have a new entry with key
> @my.co.plugin.demo.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org