-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Build fails with this plugin if you are using CI (continuous integration) and automated builds on a server. (We are using this plugin successfully in an Ionic project)
The plugin must correctly be installed again when doing a clean build, but this fails.
The same thing happens if you set up a new developer or build environment; the quick solution, also suggested here is to remove the plugin and re-install it.
I think the reason is that the plugin name is not unique and someone else is using the same name on npm
The plugin referenced on npm is a forked version of this repo and is, unfortunately, using the name cordova-plugin-freshchat
When re-installing dependencies during a normal build using npm install this will now point to the forked version of this plugin.
See https://www.npmjs.com/package/cordova-plugin-freshchat
The work-around is, after the first install
Delete the app's node_modules/ dir
Delete the app's package-lock.json file (if present)
Run npm install
Find the entry
"cordova-plugin-freshchat": "0.0.1",
in your package.json file and update it to
"cordova-plugin-freshchat": "https://github.com/techaffinity/freshchat-phonegap.git",
To remove any trace of the forked plugin
Delete the app's node_modules/ dir
Delete the app's package-lock.json file (if present)
Run npm install again
You can now commit your package.json and package-lock.json files
This could be fixed by the plugin install adding an entry into the package.json file
"cordova-plugin-freshchat": "https://github.com/techaffinity/freshchat-phonegap.git",
or this plugin should have a unique name and exist on npm