From 5340c2318516cc8e1190a4c0121fc0fd45c3bc22 Mon Sep 17 00:00:00 2001 From: ShahFaisalIslam <55596038+ShahFaisalIslam@users.noreply.github.com> Date: Sun, 4 Aug 2024 12:10:30 +0500 Subject: [PATCH] Update inquirer version in readme.md with a note on versions Inquirer versions 10+ break our code in the following manner: 1. 10.0.0 does not allow using prompt's response as variable because the question was given unknown type 2. 10.1.0+ does not allow us to provide {message,type,name}[] type of prompt to inquirer.prompt(), making it completely incompatible --- step03c_import_inquirer_ECMAScript_module/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/step03c_import_inquirer_ECMAScript_module/readme.md b/step03c_import_inquirer_ECMAScript_module/readme.md index 25a120a0..d6581002 100644 --- a/step03c_import_inquirer_ECMAScript_module/readme.md +++ b/step03c_import_inquirer_ECMAScript_module/readme.md @@ -3,10 +3,10 @@ # Using Inquirer Package The latest version (9+) of [Inquirer](https://github.com/SBoudrias/Inquirer.js/) has start using Native ECMA Script Packages. In most of our projects and assignment we will use this package. - +Note: Inquirer versions 10+ are incompatible with how we use inquirer.prompt(). Version 10.0.0 gives error on using prompted variable as it has type unknown, and 10.1.0+ do not support our prompt usage entirely. Give the following command: - npm i inquirer + npm i inquirer@9.0.0 npm i --save-dev @types/inquirer @@ -16,4 +16,4 @@ Give the following commands: tsc - node app.js \ No newline at end of file + node app.js