Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated build install error #43

Open
developerjohan01 opened this issue Nov 15, 2019 · 0 comments
Open

Automated build install error #43

developerjohan01 opened this issue Nov 15, 2019 · 0 comments

Comments

@developerjohan01
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant