You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/11/16 07:22:48 UTC
[GitHub] [cordova-cli] hugolden opened a new issue #539: '--searchpath' not working properly on Cordova 10.0
hugolden opened a new issue #539:
URL: https://github.com/apache/cordova-cli/issues/539
## Problem
I am trying to adapting our product with Cordova CLI 10. After upgrading to CLI 10.0, when adding plugin in cordova project using '--searchpath' parameter, query on registry will be hit before on local search path
### What is expected to happen?
'--searchpath' should help the command query the folder I set before querying on the registry
### What does actually happen?
'--searchpath' is hitting registry before local folder. This is not consistent with the [definition](https://cordova.apache.org/docs/en/latest/reference/cordova-cli/#cordova-plugin-command) of this parameter
## Information
Here is the command history
I hid the registry name, plugin name and version for business reason
cordova plugin add <my plugin>@<my version> --searchpath /Users/*****/Documents/SDK/plugins
Installing "<my plugin>" for android
Failed to install '<my plugin>': CordovaError: Failed to fetch plugin @<my registry>/<my dependency>@<my version> via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: Error: npm: Command failed with exit code 1 Error output:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@<my registry>%2f<my dependency> - Not found
npm ERR! 404
npm ERR! 404 '@<my registry>/<my dependency>@<my version> ' 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.
### Environment, Platform, Device
MacOS 10.15.7
npm v6.14.7
node v14.4.0
### Version information
Cordova CLI 10.0.0
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [x] I searched for existing GitHub issues
- [x ] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] hugolden edited a comment on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
hugolden edited a comment on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-823803795
@ath0mas Yes indeed. I am using scope on my package names. Is scoping deprecated? Are you meaning that scoping has a higher priority than searchpath parameter?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] ath0mas commented on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
ath0mas commented on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-782600333
Using `--searchpath` fine here too, with non-scoped packages.
Common mistake is to call `cordova plugin add` with directory name instead of [plugin _id_](https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#plugin).
@hugolden Is the _scoping_ really part of your plugin _id_ in plugin.xml?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] breautek removed a comment on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
breautek removed a comment on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-733916892
Does this work by chance with a plugin name that is not `@` character? I'm not well experienced in that part of the codebase, but I feel like it might be getting confused with scoped packages.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] breautek commented on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
breautek commented on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-733916892
Does this work by chance with a plugin name that is not `@` character? I'm not well experienced in that part of the codebase, but I feel like it might be getting confused with scoped packages.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] ChrisDev88 commented on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
ChrisDev88 commented on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-838724512
I have the same issue. Is there a solution for this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] breautek commented on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
breautek commented on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-918665309
I haven't had a chance to look into a solution, or even the cause but a workaround could be either `cordova plugin add <the actual path to the plugin>` or, `npm pack` the plugin and install `cordova plugin add the-tgz-file.tgz`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] cgerold commented on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
cgerold commented on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-1012184826
Same issue here. Any update on this topic?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] hugolden edited a comment on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
hugolden edited a comment on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-825590511
Hey guys,
I found scoping can cause many issues.
I defined the dependency of my plugin with id= "@foo/ my-plugin-bar.
When adding the plugin, the dependency plugin can be fetched correctly, while cordova CLI will raise error: Expected plugin to have ID "@foo/my-plugin-bar" but got "my-plugin-bar"
I found that the target plugin was fetched to the foo folder under plugin folder while the dependency plugin is under the plugin folder **NOT** the foo folder.
I believe this is causing the failure on looking up for the dependency.
Is it a bug?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] breautek commented on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
breautek commented on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-733919584
In my testing it appears `--searchpath` works for non-scoped package names, but does not with scoped packages. Do you observe the same behaviour?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] hugolden commented on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
hugolden commented on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-881240277
@breautek I have ever tried to add scope to plugin and the searchpath paramter works as expected in this way. However altering id will cause javascript source locating under /plugins/<scope id>/... I don't want to modify the source code to workaround this issue.
Is there any plan to fix this regression? Actually it works quite good on cordova 9
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] hugolden commented on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
hugolden commented on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-825590511
Hey guys,
I found scoping can cause many issues.
I defined the dependency of my plugin with id= "@<my-scope>/ <plugin name>".
When adding the plugin, the dependency plugin can be fetched correctly, while cordova CLI will raise error: Expected plugin to have ID "@<scope>/<plugin name>" but got "<plugin name>"
I found that the target plugin was fetched to the <scope> folder under plugin folder while the dependency plugin is under the plugin folder **NOT** the <scope> folder.
I believe this is causing the failure on looking up for the dependency.
Is it a bug?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] hugolden commented on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
hugolden commented on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-823804555
@breautek Thank you for you reply. I am using scoping for my plugins.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] hugolden commented on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
hugolden commented on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-823803795
@ath0mas Yes indeed. I am using scope on my package names. Is scoping deprecated?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-cli] hugolden commented on issue #539: '--searchpath' not working properly on Cordova 10.0
Posted by GitBox <gi...@apache.org>.
hugolden commented on issue #539:
URL: https://github.com/apache/cordova-cli/issues/539#issuecomment-979753233
> I haven't had a chance to look into a solution, or even the cause but a workaround could be either `cordova plugin add <the actual path to the plugin>` or, `npm pack` the plugin and install `cordova plugin add the-tgz-file.tgz`
Once their is registry in dependency of this plugin, this would not work
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org