Open Sudalaiyandi opened 7 years ago
I was having the same issue. I believe whoever's in charge of the npm registry for this project needs to address this. Adding the call-number plugin (like you showed in your description) results in 'mx.ferreyra.callnumber' being added as a dependency, even though the package isn't registered as such on npmjs.org.
A temporary fix would be to just remove 'mx.ferreyra.callnumber' from package.json after running 'ionic cordova plugin add call-number' (leave 'call-number', which also gets added, in there).
In package.json, i modified mx.ferreyra.callnumber to call-number.Then i install npm, now project is running successful.This is also temporary fix to my app, which you have done.That bug should be rectify only by author.
@Sudalaiyandi
i did like what u said with no luck to get it work
any fix for the iinstall problem
@mohamedsharaf are you still getting the same error? "npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/mx.ferreyra.callnumber"
If so, there's still something in your package.json file that's referencing mx.ferreyra.callnumber. Search for that dependency and make sure it's removed.
I can confirm the problem. Another problem is, with every cordova target build it also gets added back in to the package.json.
This is the same error as #43 #26 . They have been open for a while. Is there anybody maintaining this repo?
Does one need to change reference to mx.ferreya.callnumber
in config.xml?
I don't believe I had to remove or change that reference in order to get the build working - removing it from package.json alone did the trick.
I use this off github instead of npm with no problems. My config.xml looks like this:
<plugin name="CordovaCallNumberPlugin" spec="https://github.com/Rohfosho/CordovaCallNumberPlugin" />
And I agree... is anyone maintaining this?
@Rohfosho Can you please address this issue. It's causing a huge headache on each npm install
use this fixed the problem for me
remove the plugin call number and any reference for it also remove mxfree from package,json
then install through
npm install call-number
@Rohfosho why you closed this ? Can you provide working usecase? Do we have ts types somewhere? How to import it to page when we use just npm install ?
@Rohfosho Is this problem solved?
I have it building successfully. I removed mx.ferreyra.callnumber from package.json and config.xml in all places and it is building correctly with @ionic-native/call-number. This is because I noticed ionic-native/call-number has the content of mx.ferreyra.callnumber does. So in summary:
I just removed it from the package.json
file.
After that deleted the node_modules
folder.
Then npm i
.
Now no issues.
change the codova plugin
ionic cordova plugin add cordova-plugin-call-number
,
it's work
Here is what I did for the Cordova "AfterPluginInstall" Hook
"use strict";
var fs = require('fs');
var path = require('path');
/**
* This is here because the cordova plugin "Call-Number" adds a NPMJS Dependency that in non-existant on npmjs.com and will break the builds.
* https://github.com/Rohfosho/CordovaCallNumberPlugin/issues/47
*/
module.exports = function (context) {
console.log("after plugin install..... ");
console.log("context.opts.plugin.id: " + context.opts.plugin.id);
if (context.opts.plugin.id == "mx.ferreyra.callnumber") {
var encoding = 'utf-8';
var srcPackageJsonPath = path.join(context.opts.projectRoot, 'package.json');
var packageJson = JSON.parse(fs.readFileSync(srcPackageJsonPath, encoding));
delete packageJson.dependencies['mx.ferreyra.callnumber'];
fs.writeFileSync(srcPackageJsonPath, JSON.stringify(packageJson), encoding);
}
};
@Rohfosho Can you please explain why these issues are troubling the users?!
Hi Everyone, I haven't used this plugin in a little while. If anyone wants to submit a PR with a fix, I'm more than happy to merge it into master.
this fixed my issues of always wanting to install the 'mx.ferreyra.callnumber'
just remove all plugins 'mx.ferreyra.callnumber' and 'call-number'
then past this in your config file:
<plugin name="call-number" spec="1.0.4" />
then run ionic cordova prepare
and it will install the latest version and the console will never try to install 'mx.ferreyra.callnumber ' again.... happy days!
Just do this to solve the issue:
Thanks @CK110
A tricky solution found here https://github.com/ionic-team/ionic/issues/11252 (the last post) is :
myCallFunction(numberToCall:string):void{ window.open('tel:' + numberToCall, '_system') }
This issue is plaguing commercial build processes everywhere. The npm registry is not in sync with the plugin name/id in the platform plugins config for ios or android and the prepare keeps adding a bogus plugin to any build phase prepare build run or repair
someone has to intervene and take the whole plugin down until its resolved
accepting a plugin under these circumstances is bizarre maybe the administrator vanished
at least take the github repo and refabricate it so the names are in sync to prevent opensource impact
This plugin was forked and I think it was called callnumber1 and that for is being maintained. Also, this plugin exists: https://github.com/oneserve/CordovaCallNumberPlugin#readme
I have added this plugin in ionic app using command. $ ionic cordova plugin add call-number $ npm install --save @ionic-native/call-number. Then i commit my ionic app in git.After i checkout my application from git, then i installed npm install.I got this error like this. npm ERR! code E404 npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/mx.ferreyra.callnumber npm ERR! 404 npm ERR! 404 'mx.ferreyra.callnumber' 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 It was specified as a dependency of 'ionic-hello-world' npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
How can i solved this issue ?