Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
Description
This is a big issue in cordova@8 since you can't opt out of cordova-fetch. Using a url such as `github.com` or the file system for a plugin doesn't work with package.json. It still works using config.xml:
<plugin name="cordova-plugin-repo" spec="https://github.com/user/cordova-plugin-repo#specific-branch" /> <plugin name="local-plugin" spec="src/local-plugin" />
This works when running cordova platform add. However, if you do not use --nosave this will update package.json dependencies:
"cordova-plugin-repo": "git+https://github.com/user/cordova-plugin-repo#branch", "local-plugin": "file:src/local-plugin",
If you try to install with package.json like this, you'll get errors for these packages:
Failed to restore plugin "cordova-plugin-repo" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin https://github.com/user/cordova-plugin-repo#branch via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received type undefined Discovered plugin "local-plugin" in config.xml. Adding it to the project Failed to restore plugin "local-plugin" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin file:src/local-plugin via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Failed to get absolute path to installed module
Attachments
Issue Links
- relates to
-
CB-13503 Problems with using plugins from local file system
- Closed