Could not install 'node_modules/cordova-plugin-app-event'


#1

Hi,
While working on an Ionic project, I installed around 12 plugins, and while building for iOS, some errors occurred which made me uninstall everything and reinstall.
Now, while trying to bring back all the plugins, only way I find it’s possible is by installing each plugin separately, which again throws an error, could not install 'cordova-plugin-app-event'.

Q. How to solve error, could not install 'cordova-plugin-app-event'?


Local Notifications not working in Ionic
Unable to uninstall ionic plugin
#2

It’s fixed:
Here’s the link for the fix:


#3

We have node_modules in our project directory, and it was trying to look for a package.json file inside node_modules/node_modules, so there are 2 things that could be done:

Change that path inside your project’s package.json
Or,
a) Copy cordova-plugin-app-event directory from inside of some other plugin (I found it inside Local Notification Plugin which can be found here “https://ionicframework.com/docs/native/local-notifications/”)
b) Create a directory named node_modules inside already existing node_modules directory of your project.
c) cd into /node_modules/node_modules
d) Paste cordova-plugin-app-event directory here.


#4

liste


#5

i solve this by delete it directly from my package and run npm i