Enquirer is stuck
I use enquirer. It was working fine. But it is no longer working.
Code is stuck here. I am using VScode on Win 11.
Repo -> https://github.com/react18-tools/turborepo-template/ File -> scripts/rebrand.js
const { shouldRebrand } = await prompt({
type: "confirm",
name: "shouldRebrand",
message: "Do you want to rebrand this repo?",
initial: true,
});
It only shows Running... in the terminal.
Ok. It works when I run the script from terminal, like node scripts/rebrand.js. But I have added the script as preinstall.
"preinstall": "node scripts/update-pm.js"
So when I install the dependencies, it gets stuck. Please note that you need to comment out line number 15 to run the script.
Hmm, prompt is being called at the bottom of rebrand.js but it's not being awaited. I'm not sure what else might be causing it.
The culprit seems to be running it as preinstall script. It runs normally otherwise. And I have tested removing the last prompt as well.
K, sounds like this is technically resolved then. I'll go ahead and close. Let us know if you want to discuss further.