Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lerna is not redering inquirer prompt properly #3835

Open
Amit-limbasiya opened this issue Sep 12, 2023 · 2 comments · May be fixed by #3881
Open

Lerna is not redering inquirer prompt properly #3835

Amit-limbasiya opened this issue Sep 12, 2023 · 2 comments · May be fixed by #3881
Labels
accepting-prs We would gladly receive a PR to resolve this issue type: bug

Comments

@Amit-limbasiya
Copy link

I am using lerna to handle the monorepo project structure.

When I run below code

const question = [{
       type: 'input',
       name: 'permission',
       message: chalk.red(logMessages.deleteFeatureReleaseBranch.permissionMessage),
       filter: (input: string) => {
            return input.trim();
       },
       validate: (input: string) => {
         if (!validatePermissionInput(input)) return logMessages.deleteFeatureReleaseBranch.permissionValidationFailedMessage;
              return true;
          }
}];

const permission:string = (await inquirer.prompt(question)).permission;
  • from the perticular project directory with simple node.js command node dist/src/index.js delete-feature -r
    It is showing the proper output as
    Are you sure you want to delete these branches(Y|N):

  • But when i run the command from the root directory as lerna command like lerna run start --scope=cli-app -- delete-feature -r
    It is not showing the prompt question like above. But when I force close the application or give random input which is failing validation, then it is showing the prompt question.

I don't know whether the issue is with inquirer (like extra configuration for lerna support) or it is the lerna not supporting inquirer prompt question.

@Amit-limbasiya
Copy link
Author

Amit-limbasiya commented Sep 13, 2023

I received one help from inquirer repo author and I can now relate this issue with the existing issue #3214 . I just want to know that how we can configure to stdio value as inherit. I mean is there any way to define it inside package.json or lerna.json anywhere. Or it is just default. If it is default then I dont know why I am still getting error. Although the issue is resolved in lerna v5 and I am using lerna latest version. Do I need to shift to v5?

@fahslaj fahslaj self-assigned this Oct 19, 2023
@fahslaj fahslaj added the accepting-prs We would gladly receive a PR to resolve this issue label Oct 19, 2023
@fahslaj fahslaj removed their assignment Oct 19, 2023
@amorscher amorscher linked a pull request Oct 27, 2023 that will close this issue
10 tasks
@amorscher
Copy link
Contributor

amorscher commented Oct 27, 2023

I think this issue is related to nrwl/nx#13540 . When this issue is resolved using nx for running tasks should be fine.

It looks like everything is fine just the last line of the spawned process is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting-prs We would gladly receive a PR to resolve this issue type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants