You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot read property 'value' of undefined at module.exports.currentChoices.getChoice (/Users/jranz/amplify/amplify-cli/packages/amplify-category-xr/node_modules/inquirer-fuzzy-path/index.js:89:35) at InquirerFuzzyPath.Prompt.onKeypress (/Users/jranz/amplify/amplify-cli/packages/amplify-category-xr/node_modules/inquirer-autocomplete-prompt/index.js:217:29) ...
I tried adding a check for 'choice' returning: if (!choice) { return { value: null, name: null, short: null } }
Seeing an exception thrown when trying to do a tab complete on a path that in not in the rootPath.
inquirer-fuzzy-path/index.js
Line 87 in 0704526
TypeError: Cannot read property 'value' of undefined at module.exports.currentChoices.getChoice (/Users/jranz/amplify/amplify-cli/packages/amplify-category-xr/node_modules/inquirer-fuzzy-path/index.js:89:35) at InquirerFuzzyPath.Prompt.onKeypress (/Users/jranz/amplify/amplify-cli/packages/amplify-category-xr/node_modules/inquirer-autocomplete-prompt/index.js:217:29) ...
I tried adding a check for 'choice' returning:
if (!choice) { return { value: null, name: null, short: null } }
and I see a line in the autocomplete-prompt package also throws an exception:
https://github.com/mokkabonna/inquirer-autocomplete-prompt/blob/master/index.js#L215
TypeError: Cannot read property 'length' of null at InquirerFuzzyPath.Prompt.onKeypress (/Users/jranz/amplify/amplify-cli/packages/amplify-category-xr/node_modules/inquirer-autocomplete-prompt/index.js:221:61) ...
I am able to workaround this by checking if 'autoCompleted' is null and setting it to empty string.
I'll open a similar issue in the autocomplete package.
I really like this plugin, so let me know if I am either doing something incorrect or if I can help make the fix to improve this use case!
The text was updated successfully, but these errors were encountered: