Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find module 'compare-func' Cordova Android

I've got a Cordova v10.0.0 project using Cordova Android v9.0.0, I'm experiencing a problem when trying to build the project for Android, I'm getting the following error:

Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/Users/MYUSER/Library/Android/sdk (DEPRECATED)
Failed to instantiate ProjectBuilder builder: Error: Cannot find module 'compare-func'

I've tried removing my Node Modules folder, running a cordova clean android and re-installing with npm install. Not quite sure why I'm getting this error.

like image 265
Ryan H Avatar asked Aug 18 '20 14:08

Ryan H


1 Answers

I faced the same issue and I installed compare-func npm package (Link) (npm i compare-func) and it worked for me.

like image 109
Bhadresh Arya Avatar answered Oct 05 '22 08:10

Bhadresh Arya