[ 
https://issues.apache.org/jira/browse/CB-12774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to