josehector commented on issue #913:
URL: https://github.com/apache/cordova-android/issues/913#issuecomment-670453282


   I found the error. 
   The problem is with Node version. 
   this piece of code is where error occurs
   
   ```
   function recursivelyFindFiles (dir, extension) {
       if (!fs.existsSync(dir) || !extension) return [];
   
       const files = fs.readdirSync(dir, { withFileTypes: true })
           .map(entry => {
               const item = path.resolve(dir, entry.name);
   
               if (entry.isDirectory()) return recursivelyFindFiles(item, 
extension);
               if (path.extname(entry.name) === `.${extension}`) return item;
               return false;
           });
   
       return Array.prototype.concat(...files)
           .filter(file => file !== false);
   }
   ```
   _withFileTypes_ parameter is only available in Node 10.10.0 version 
(https://nodejs.org/api/fs.html#fs_fs_readdirsync_path_options)
   In my case I am using 10.4.0 Node version so this parameter is not 
available, and for that _entry_ is a string value (_entry.name_ is undefined).
   
   Therefore, updating Node version to 10.10.0 we solve the problem.
   
   I don't know if this Node version dependency is normal or not, but I didn't 
find which Node version dependency is needed with this plugin version.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to