diff --git a/lib/initUtils.js b/lib/initUtils.js index b3c8d7c..4161e96 100644 --- a/lib/initUtils.js +++ b/lib/initUtils.js @@ -158,7 +158,9 @@ function copyRecognizers(appDir, appId, appVers, recognizerDirectory) { if (directoryExists(pluginRecognizersLocation)) { // Get recognizers in a plugin's appDir/config/xxx location printFormattedDebug(`rec ${pluginRecognizersLocation} exists`); - fs.getFilesInDirectory(pluginRecognizersLocation).forEach(filename => { + fs.readdirSync(pluginRecognizersLocation, {withFileTypes: true}).filter(statObj=> statObj.isFile()) + .forEach((statObj) => { + const filename = statObj.name; const filepath = path.resolve(pluginRecognizersLocation, filename); const filepathConfig = path.resolve(path.join(recognizerDirectory, filename));