Table of Contents
[IONIC] Error: ENOENT: no such file or directory
This error appears when I run Capacitor first, then I decide to change to Cordova
ionic cordova run android -l -c
How to fix Error: ENOENT: no such file or directory when running Ionic Cordova
I was running with the same error and today I found out the solution. In the past, I tried a capacitor plugin, but my project is cordova, so I removed it from my project. But I think that some files were not properly deleted and when I ran ionic repair, the problem started. So, to repair this I deleted the ANDROID folder at project root, any files related to Capacitor at root, edited the package.json and removed everything related with Capacitor and everything works again.
Solution
- Delete the
android
folder at project root - Edit the
package.json
and remove everything related withCapacitor