apache / cordova-fetch Goto Github PK
View Code? Open in Web Editor NEWApache Cordova Fetch Library
Home Page: https://cordova.apache.org/
License: Apache License 2.0
Apache Cordova Fetch Library
Home Page: https://cordova.apache.org/
License: Apache License 2.0
$ npx cordova plugin add https://github.com/phonegap/phonegap-plugin-contentsync.git
should succeed since "url to a git repository containing a plugin.xml" is a valid plugin-spec.
$ npx cordova --version
8.0.0
$ npx cordova plugin add https://github.com/phonegap/phonegap-plugin-contentsync.git
Installing "phonegap-plugin-contentsync" for android
Installing "phonegap-plugin-contentsync" for ios
Adding phonegap-plugin-contentsync to package.json
Saved plugin info for "phonegap-plugin-contentsync" to config.xml
$ npx cordova plugin rm phonegap-plugin-contentsync
Uninstalling phonegap-plugin-contentsync from android
Uninstalling phonegap-plugin-contentsync from ios
Removing "phonegap-plugin-contentsync"
Removing plugin phonegap-plugin-contentsync from config.xml file...
Removing phonegap-plugin-contentsync from package.json
$ npx cordova plugin add phonegap-plugin-contentsync
Installing "phonegap-plugin-contentsync" for android
Installing "phonegap-plugin-contentsync" for ios
Adding phonegap-plugin-contentsync to package.json
Saved plugin info for "phonegap-plugin-contentsync" to config.xml
$ npx cordova plugin rm phonegap-plugin-contentsync
Uninstalling phonegap-plugin-contentsync from android
Uninstalling phonegap-plugin-contentsync from ios
Removing "phonegap-plugin-contentsync"
Removing plugin phonegap-plugin-contentsync from config.xml file...
Removing phonegap-plugin-contentsync from package.json
$ npm install [email protected]
+ [email protected]
added 161 packages from 112 contributors, removed 73 packages, updated 53 packages and audited 1707 packages in 19.859s
Note that, in the case of the registry add, the first run of the command fails, and the second run of the identical command succeeds
$ npx cordova plugin add phonegap-plugin-contentsync
Failed to fetch plugin phonegap-plugin-contentsync via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Could not determine package name from output:
[email protected] node_modules/phonegap-plugin-contentsync
$ npx cordova plugin add phonegap-plugin-contentsync
Installing "phonegap-plugin-contentsync" for android
Installing "phonegap-plugin-contentsync" for ios
Adding phonegap-plugin-contentsync to package.json
However, the git add always fails.
$ npx cordova plugin add https://github.com/phonegap/phonegap-plugin-contentsync.git
Failed to fetch plugin https://github.com/phonegap/phonegap-plugin-contentsync.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Could not determine package name from output:
[email protected] node_modules/phonegap-plugin-contentsync
$ npx cordova plugin add https://github.com/phonegap/phonegap-plugin-contentsync.git
Failed to fetch plugin https://github.com/phonegap/phonegap-plugin-contentsync.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Could not determine package name from output:
[email protected] node_modules/phonegap-plugin-contentsync
$ npx cordova plugin add https://github.com/phonegap/phonegap-plugin-contentsync.git
Failed to fetch plugin https://github.com/phonegap/phonegap-plugin-contentsync.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Could not determine package name from output:
[email protected] node_modules/phonegap-plugin-contentsync
$ cordova plugin add <git URL>
OR
$ cordova plugin add <local URL>
Mac OSX Catalina 10.15.5
For cordova and ionic:
$ npx cordova --version
9.0.0 ([email protected])
$ npx ionic --version
6.10.1
For other cordova dependencies, I have attached my package.json
package.json.gz
For the rest of the environment:
export NVM_VERSION=0.35.3
export NODE_VERSION=14.5.0
export NPM_VERSION=6.14.5
https://github.com/pnpm/pnpm is almost a drop-in replacement for npm, and I am successfully using it with cordova-fetch by creating a symlink from npm
to pnpm
.
The flags used by cordova-fetch are also compatible with yarn
, afaics, but I havent tested that. npm is also planning a new package manager on the horizon, https://github.com/npm/tink , which looks likely to support the same args.
@zkochan, creator of pnpm, has created https://github.com/zkochan/which-pm to do the detection, so it should be fairly easy to invoke the correct package manager, using the same flags.
fetch repeat the plugin whose repo like git+https://xxx when exec
npm install && cordova prepare
the plugin has been download when npm install
no need to download it when cordova prepare
Discovered saved plugin "org.wbt11a.Canvas2ImagePlugin". Adding it to the project
No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "git+https://github.com/wbt11a/Canvas2ImagePlugin.git#6195584c2b"
fetch: Installing git+https://github.com/wbt11a/Canvas2ImagePlugin.git#6195584c2b to /Users/me/app
git clone a cordova app project
npm install && cordova prepare
cordova-fetch.js
return pathToInstalledPackage(target, dest)
.catch(_ => installPackage(target, dest, opts));
function pathToInstalledPackage (spec, dest) {
return Promise.resolve().then(_ => {
const { name, rawSpec } = npa(spec, dest);
if (!name) {
throw new CordovaError(`Cannot determine package name from spec ${spec}`);
}
return resolvePathToPackage(name, dest)
.then(([pkgPath, { version }]) => {
if (!semver.satisfies(version, rawSpec)) {
throw new CordovaError(`Installed package ${name}@${version} does not satisfy ${name}@${rawSpec}`);
}
return pkgPath;
});
});
}
npa could't resolve the plugin name
Cannot determine package name from spec git+https://github.com...
[email protected]
[email protected]
After merging #24, we do not invoke npm install
if the requested package is already installed. Thus, cordova-fetch
will not add the requested package to dependencies
of package.json
.
However, some tests in cordova-lib
expect that calling cordova-fetch
with {save: true}
will add the requested package to dependencies
of package.json
. This does not cause the tests to fail with the current version of cordova-fetch
since there are no "dependency cache-hits" right now. But when I experimented with #44 to speed up cordova-lib
E2E tests, some of the tests started to fail.
So how should we handle save: true
when the requested package is already installed?
I think the current behavior is fine. When we find a package already installed, either a user manually installed it, or it had been previously installed by Cordova. In any case, it would have been added to dependencies
unless that behavior was explicitly suppressed. So I don't really expect this behavor to break anything.
Frankly, it would be better if cordova-fetch
would only fetch dependencies and was not expected to manage package.json
in the first place, but that is a different story I guess.
Migrated from https://issues.apache.org/jira/browse/CB-14256:
coho audit-license-headers -r fetch
uncovered the following text files without a valid license header:
spec/support/dummy-local-plugin/plugin.xml
spec/support/repo-name-neq-plugin-id.git/HEAD
spec/support/repo-name-neq-plugin-id.git/config
spec/support/repo-name-neq-plugin-id.git/refs/heads/master
On the 1.3.x
branch this issue only shows up in spec/support/dummy-local-plugin/plugin.xml
at this time.
Recommended solution is to add standard header to spec/support/dummy-local-plugin/plugin.xml
and add the other files to .ratignore
.
Currently, Cordova platforms and plugins are saved as dependencies
in the package.json
file. Hence, during the Cordova prepare step, necessary files for plugins are moved for bundling with the app. These dependencies
are not used directly with the app, so I believe, they should be treated as devDependencies
.
I want to clear out Cordova platforms and plugins from dependencies
because it could affect platforms that leverage the npm
modules. This issues can be seen with the newest platform - Electron. With Electron it is expected that you use npm
packages within the application and should be installed as dependencies
.
For instance, if we want to use lodash
with Electron app, we would npm install lodash
and then import it using require
. When we run
the application everything works as expected because it uses the module from {project}/node_modules
. But with build
we need to take all the dependencies
from the project and install them within the app.
As a result:
With Cordova platforms and plugins defined in the dependencies
, for example, cordova-electron
the packaged app size will increase greatly.
With Cordova platforms and plugins defined in the devDependencies
, they would not be installed with the app and reduce the package size.
Again, Cordova platforms and plugins should be treated as development building blocks and shouldn't be in the app
The current implementation of the npm arguments handling is the following:
function npmArgs (target, userOptions) {
const opts = Object.assign({ production: true }, userOptions);
const args = ['install', target];
if (opts.production) {
args.push('--production');
}
if (opts.save_exact) {
args.push('--save-exact');
} else if (opts.save) {
args.push('--save');
} else {
args.push('--no-save');
}
return args;
}
My suggestion would be instead of using --save
flag, change it to --save-dev
. While the --save
option still appears to work, it is no longer required. The npm install
saves any specified packages into dependencies
by default.
Besides that, we also append --production
flag. With the --production
flag npm will not install modules listed in devDependencies
. However, the --production
flag has no particular meaning when we are adding a dependency to a project. I think that should be removed. Plus, if you use --production
and --save-dev
flags together, it causes npm install
to break.
Later we could also remove options, like production, that get passed from cordova-lib
to the cordova-fetch
and do a general clean up.
Manually move Cordova platforms and plugins, that don't need to be bundled with an app, from dependencies
to the devDependecies
.
As the subject line says, the cordova-fetch
module cannot install plugins from git repositories when used with npm 3 (and perhaps 4 - I haven't tested that).
When I run cordova plugin add --save git+https://github.com/apache/cordova-plugin-inappbrowser.git
, I get an error message instead of the plugin installing correctly (this happens with every git repository I've tested).
I expect the plugin to install correctly.
I see the following error output:
Failed to fetch plugin git+https://github.com/apache/cordova-plugin-inappbrowser.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: Cannot find module 'UNMET/package.json' from '/Users/neagleson/cordova-fetch-bug-demo/test'
The problematic code is here. It assumes that the last line of output will have the installed plugin's spec on it, but that is not true when there is an unmet peer dependency - hence the 'UNMET'
string in the error message.
Here is a script that reliably reproduces the problem on my machine (Mac OS X 10.14.6). It assumes a working node
and npm
version of some sort are already installed.
#! /bin/bash
mkdir -p "$HOME/cordova-fetch-bug-demo"
cd "$HOME/cordova-fetch-bug-demo"
# Accept all default options when prompted
npm init
npm install --save [email protected]
npm install --save [email protected]
export PATH="$HOME/cordova-fetch-bug-demo/node_modules/.bin:$PATH"
cordova create test com.example.cordovafetchbug CordovaFetchBug
cd test
cordova platform add ios
# Adding a dependency that has an unmet peer dependency to trigger the issue
npm install --save [email protected]
cordova plugin add --save git+https://github.com/apache/cordova-plugin-inappbrowser.git
As documented above, Cordova CLI 9, default version of the iOS platform, installing the cordova-inapp-browser plugin from Git, XCode 10.1, on Mac OS X 10.14.6.
Currently, cordova-fetch only checks the project's node_module directory, without checking parent directories. For example, in:
myproject/
node_modules/
dependency/ -> ../packages/dependency
packages/
dependency/
subproject/
index.js
config.xml
package.json
package.json
If we require('dependency')
from index.js, node will search through all ancestor directories for node_modules/dependency.
However, cordova-fetch
doesn't support this. Instead, it will install dependency
again (from the npm repository) inside myproject/packages/subproject/node_modules
This is a problem for use cases like yarn workspaces, where the standard node module resolution algorithm is used to help "dependency" be developed alongside "subproject".
Solving this problem could be a good way to improve support for yarn workspaces without needing to add explicit support for yarn.
Migrated from https://issues.apache.org/jira/browse/CB-14251, with minor updates:
1.3.x
patch release wanted with the following updates:
master
branch, see note below)1.3.x
patch release branch (cherry-pick of some commits from GH-36) ref: GH-35Following steps at https://github.com/apache/cordova-coho/blob/master/docs/tools-release-process.md (with some minor adjustments)
Note: cordova-common@^2.2.5 dependency update is not wanted in master
branch. The master branch of this and other Cordova repos should now target the next major release as discussed in this [email protected] thread.
cordova-android referencing git repo is not respected, and is being changed to npm package version when performing a release build
When cordova-android is in devDependencies, and is referencing a git branch (rather than a npm package version).
As part of the release build (with clean environment - no platform and plugin folder), cordova-android reference is changed to latest stable npm package.
example package.json
"devDependencies": {
....
"cordova-android": "git+https://github.com/8bhsolutions/cordova-android.git#9.0.x-mod",
.....
}
The reference should remains unchanged.
The reference gets changed to 9.0.0, and the build process
"devDependencies": {
....
"cordova-android": "9.0.0",
.....
}
After upgrading cordova-android
to 9.0 and cordova
to 10.0.0, when I build I notice that some of my cordova plugins where moved to devDependencies
.
It seems that only the cordova plugins which reference git repos were moved. The plugins that reference a npm package release were still kept in dependencies
node.
Then googling for why this happened, I stumbled across the #64, which is released in cordova-fetch
3.0.0
So I decided to manually move all the other cordova plugins and cordova-android platform to devDependencies
.
If I leave cordova-android
in dependencies
node, the build does not touch it.
When I checkout a clean copy of my source code. So the node_module, platform and plugins folder will be fetched as part of the build process.
I run then following command
Windows 10
VS Code: 1.50.1
Node: 12.19.0
Release build for Android
Debug build seems ok
cordova info
Cordova Packages:
cli: 10.0.0
common: 4.0.2
create: 3.0.0
lib: 10.0.0
common: 4.0.2
fetch: 3.0.0
serve: 4.0.0
Project Installed Platforms:
android: 9.0.0
Environment:
OS: Microsoft Windows 10 Pro 10.0.19041 (19041) (win32 10.0.19041) x64
Node: v12.19.0
npm: 6.14.8
ionic info
Ionic:
Ionic CLI : 5.2.3
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : android 9.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 3.1.2, (and 42 other plugins)
Utility:
cordova-res : not installed
native-run : 0.2.8
System:
Android SDK Tools : 26.1.1
NodeJS : v12.19.0
npm : 6.14.8
OS : Windows 10
I ran into an issue which was hard to figured it out so I want to share it for others. Maybe something should be written somewhere in the documentation of cordova-fetch
or cordova-cli
or even better this should be consolidated.
I develop a cordova plugin for my app in a bitbucket private repository and obviously I want to cordova plugin add
it in my project.
First time I add my plugin on working project with the command:
$ cordova plugin add git+ssh://[email protected]/myteam/cordova-plugin-my-plugin.git
All goes fine (nb: did not investigate why it goes fine on the first time). Problems happen when I was trying to start a fresh clone of my project.
$ cordova prepare --verbose
...
Discovered plugin "cordova-plugin-my-plugin" in config.xml. Adding it to the project
No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "git+ssh://[email protected]/myteam/cordova-plugin-my-plugin.git"
Running command: npm install git+ssh://[email protected]/myteam/cordova-plugin-my-plugin.git --production --no-save
Command finished with error code 0: npm install,git+ssh://[email protected]/myteam/cordova-plugin-my-plugin.git,--production,--no-save
Failed to restore plugin "cordova-plugin-my-plugin" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin git+ssh://[email protected]/myteam/cordova-plugin-my-plugin.git 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
...
As you can see Command finished with error code 0: npm install
(OK) and then Failed to restore plugin "cordova-plugin-my-plugin" from config.xml.
... Failed to get absolute path to installed module
🤔
When I realized that, I started looking for code root issue: cordova-cli
> cordova-lib
> cordova-fetch
And investigating in dependency-ls
, I understood how cordova-fetch
is checking npm install
execution success and how custom repository (out of registry) are handle as 'UNMET DEPENDENCY'.
npm ls --depth=0
parsed by dependency-ls
under the hood)npm install
node_modules
node_modules/${package_id_issued_from_dependency_ls}
node_modules/*/package.json
and try to find givenPackageUrl === pkg.repository.url
At start I thought my case matches 5.1. case... Wrong! dependency-ls
in the particular case of out of registry packages output my package id has: UNMET DEPENDENCY cordova-plugin-my-plugin
... Then trying to find node_modules/UNMET DEPENDENCY cordova-plugin-my-plugin/
... 🤪
So, go to 5.2.! And here I have made the most insidious mistake... In Bitbucket you can clone your repository with two different
git+ssh://[email protected]:myteam/cordova-plugin-my-plugin.git
^
and
git+ssh://[email protected]/myteam/cordova-plugin-my-plugin.git
^
And unfortunately I've added my plugin with one form while the other was in my package.json
.
While all is going well on the install, cordova-fetch
wasn't able to realize it. And I really didn't expect cordova
relying on the package.json
repository url... I don't know why by design cordova-fetch
does not rely on npm
exit code? And at least may be you should remove UNMET DEPENDENCY
from the package name in 5.1. so that directory exist test succeed.
HTH, cheers!
CordovaError: Error: An unknown git error occurred
When you try to build the app from the scratch in macOS Terminal using: sudo cordova platform add ios
the following error appear for each plugin listed on config.xml
Error :
Discovered plugin "cordova-plugin-vibration". Adding it to the project
Failed to fetch plugin https://github.com/apache/cordova-plugin-vibration.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: Error: An unknown git error occurred
cordova cannot fetch plugin from git
(plugin listed on config.xml
file)
for e.g.:
<plugin name="cordova-plugin-battery-status" spec="https://github.com/apache/cordova-plugin-battery-status.git" />
sudo cordova platform add ios
MacOS Terminal
CLI 11.1.0
Cordova-ios v6.3.0
Node v18.16.0
git v2.40.1
Xocde 14.3
It would appear that when I run a cordova prepare
using cordova-fetch, it takes drastically longer than when I run it without cordova-fetch.
I have tested this on a repo with no platforms or plugins present in the directory structure, and about 20 plugins and 2 platforms defined in the package.json.
Using cordova 6.5, cordova prepare
runs in about 30 seconds to add the platforms and plugins.
Using cordova 7, cordova prepare --nofetch
takes about the same amount of time.
Using cordova 7, cordova prepare
takes about somewhere around 5 minutes.
Using cordova 8, cordova prepare
takes about the same amount of time as cordova 7 with the fetch.
Is this a known issue? This is a pretty painful amount of time to have to wait for a clean build. It causes builds on our build server to bloat quite significantly.
Any help would be appreciated.
Thanks!
When I attempt to install a plugin I get an error.
These are all steps I have done successfully in the past.
Successful installation of the plugin
$ cordova plugin add ../cordova-background-geolocation
{ CordovaError: Could not determine package name from output:
up to date in 10.929s
at getTargetPackageSpecFromNpmInstallOutput (/usr/local/lib/node_modules/cordova/node_modules/cordova-fetch/index.js:104:11)
at processTicksAndRejections (internal/process/next_tick.js:81:5)
name: 'CordovaError',
message:
'Could not determine package name from output:\nup to date in 10.929s',
code: 0,
context: undefined }
Mac 10.14.4
Device manufacturer / model:
Cordova version (cordova -v):
9.0.0 ([email protected])
Cordova platform version (cordova platform ls):
android ^8.0.0
browser ^6.0.0
electron ^1.0.0
osx ^5.0.0
windows ^7.0.0
From review of PR #38 (1.3.1
patch release updates on 1.3.x
branch) and unit testing in WIP PR #39 we discovered that the code will use incorrect module ID in case of certain URL patterns on 1.3.1
. It is not yet certain whether or not this would be an issue on master
.
Sample URLs where the incorrect module ID is observed in the unit tests in WIP PR #39:
https://scm.git.service.io/user/my-repo.git
git://scm.git.service.io/user/my-repo.git
https://scm.service.io/user/my-repo-other-url
where npm
indicates that it installed [email protected]
https://scm.service.io/user/my-repo#old-tag
git://scm.service.io/user/my-repo#old-tag
Unfortunately the unit tests in WIP PR #39 will not work on master
due to changes in the code.
TODO:
master
master
if needed1.3.x
, before next major release is published from the changes in master
Using cordova 6.5, cordova prepare my proyect runs in about 5~6 minutes to add the platforms and plugins.
Using cordova 8, around 44 minutes.....
Any release to fix that?
In the getTargetPackageSpecFromNpmInstallOutput
method, if the dependency or sub-dependency have a postinstall, for example electron package, it will print out extra lines:
> [email protected] postinstall /cordova-project/node_modules/electron
> node install.js
Because of this additional print, the getTargetPackageSpecFromNpmInstallOutput
method fails to parse properly the printout for the package name.
Appending the --silent
flag would hide the addition printout and maintain the proper parsing. However, the --silent
flag would prevent showing npm ERR! output on error. and they would be printed just in the .log file.
As a recommendation it would be better to loop through the printout and look for a particular format.
$ npx cordova@nightly create cordova-project
$ cd cordova-project
$ npx cordova@nightly platform add github:apache/cordova-electron
The steps above uses Nightly to test the Electron for Cordova 9 release.
Using cordova-fetch for github:apache/cordova-electron
Failed to fetch platform github:apache/cordova-electron
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Could not determine package name from output:
> [email protected] postinstall /cordova-procject/node_modules/electron
> node install.js
+ [email protected]
I've been looking at why our builds for an Ionic based application are much slower with Cordova 8.1.2 vs 6.5, and I believe it's related to this project. For example, adding a plugin via link where it doesn't actually need to download anything, in our project, Cordova 6.5 takes 3.6s, and 8.1 takes 9.5s. As I dug into the code further, I found that dependency-ls takes ~3.5s, and it runs before and after npm install in cordova-fetch. With our 29 plugins, this adds a solid 3 minutes. It's unfortunately even slower with our jenkins VM, adding ~6 minutes to builds. I realize this is called out as a quirk in this proposal: https://github.com/apache/cordova-discuss/blob/master/proposals/fetching.md . I wonder if this quirk could be addressed to get the package.name in less than 7 seconds.
On my CI builds (clean every run), I run :
With [email protected] :
Extract of the logs pertaining to plugin cordova.plugins.diagnostic :
Discovered saved plugin "cordova-plugin-file-transfer". Adding it to the project
Installing "cordova-plugin-file-transfer" for android
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-file" already installed on android.
Installing "cordova-plugin-file-transfer" for ios
With [email protected] :
Extract of the logs pertaining to plugin cordova.plugins.diagnostic :
Discovered saved plugin "cordova-plugin-file-transfer". Adding it to the project
No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "git+https://github.com/dpa99c/cordova-plugin-file-transfer.git"
fetch: Installing git+https://github.com/dpa99c/cordova-plugin-file-transfer.git to /Users/vagrant/git
Running command: npm install git+https://github.com/dpa99c/cordova-plugin-file-transfer.git --no-save
Command finished with error code 0: npm install,git+https://github.com/dpa99c/cordova-plugin-file-transfer.git,--no-save
Failed to restore plugin "cordova-plugin-file-transfer" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin git+https://github.com/dpa99c/cordova-plugin-file-transfer.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Could not determine package name from output:
package.json :
"dependencies": {
"cordova-plugin-file-transfer": "git+https://github.com/dpa99c/cordova-plugin-file-transfer.git",
...
}
I have the same issue with github dependencies with syntax :
github:dpa99c/cordova-plugin-file-transfer
ionic cordova prepare --no-build --prod --release
Stack used: Xcode 12.1.x, on macOS 10.15.6 (Catalina)
ionic : 5.4.16
cordova : 9.0.0
cordova-common: 3.2.0
cordova-fetch : 2.0.1
We're having trouble installing plugins from a private git repository by url.
cordova plugin --verbose add git+https://gitlab.internal/cordova-plugin-our-custom-plugin.git
Adding an existing tag to the url to make cordova-fetch fail:
cordova plugin --verbose add git+https://gitlab.internal/cordova-plugin-our-custom-plugin.git#1.11.0
The error implies, that the destination path could not be found:
Failed to get absolute path to installed module
at C:\Users\xyz\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\fetch.js:173:37
Since --nofetch
is deprecated in recent versions of cordova, is there a way to make this work?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.