Closed emulienfou closed 1 year ago
Hi @emulienfou Thanks for reporting the issue, and sorry for the late reply. Unfortunately I haven't really set aside much time or thought to maintaining this package. Great point that the --qr option probably does not work all that well if the server is run as any type of sub task. I'm thinking that this should probably just be better documented and throw a more descriptive error. But to get a better understanding of your problem: What would be the ideal case for your example, would you like two QR codes to be printed to the terminal?
I've released patch version 0.1.2 which not only checks stdin for isTTY()
but now also verifies that setRawMode
is an actual function. The functionality for the --qr
parameter will be that the QR code is printed once, and it's not possible to show it again except for restarting the server. Hopefully this is ok for your use-case, comment here otherwise and i'll reopen the issue.
Thanks @TobiasMelen fir the fix!
Hi there, I have a monorepo that runs multiple Next.js project using
concurrently
.When you "hijack" stdin to print the QR code with the param
--qr
this generate the next error in all the next project:To reproduce the issue, add the next scripts in your pacakge.json:
In app1 dev script is running the command:
next-dev-https --https --qr --port 4430
while app2 is runningnext-dev-https --https --qr --port 4431