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

fix: npx tsx confirmation prompt blocks #629

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

tlow92
Copy link
Contributor

@tlow92 tlow92 commented Oct 23, 2024

node -v
v18.20.2
npm -v
10.5.0

Issue:

When using yarn build and not having tsx already in npx cache lerna does not expose the cli prompt of npx so the command just gets stuck at:

❯ yarn build
lerna notice cli v8.1.8

   ✔  @storybook/addon-ondevice-actions:prepare (2s)

——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 Lerna (powered by Nx)   Running target prepare for 7 projects

   →  Executing 1/6 remaining tasks...

   ⠴  @storybook/react-native-theming:prepare

   ✔  1/1 succeeded [0 read from cache]

What I did

I think there are 3 possible solutions

  1. append --yes flag to npx commands to automatically confirm prompts
  2. add tsx as devDependency
  3. use yarn dlx instead (I think it does not require confirmation)

For the sake of simplicity I chose option 1

How to test

Clear npx temporary cache to get prompt again

  1. Run rm -rf $(npm config get cache)/_npx

  2. Run yarn build again

  3. If it does not get stuck verify that tsx is not already installed npx tsx should ask for prompt

Need to install the following packages:
[email protected]
Ok to proceed? (y)

@tlow92 tlow92 requested a review from dannyhw as a code owner October 23, 2024 19:32
@dannyhw
Copy link
Member

dannyhw commented Oct 23, 2024

Looks good, thanks!

@dannyhw dannyhw merged commit d57c562 into storybookjs:next Oct 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants