amplify init stuck after choosing editor
Describe the bug A clear and concise description of what the bug is.
To Reproduce amplify init and then choose any editor ( doesnt matter which, result is same)
Expected behavior obv init project, continue with other questions etc
Screenshots https://i.imgur.com/wXyfkeO.png
Desktop (please complete the following information):
- OS: Windows 10 x64 Node 11
amplify -v
0.1.29
Same with me. Window 7 enterprise edition, Node10 amplify 0.1.29
@aldarund Do you have windows subsystem for linux?
@yuth i have it installed, but i dont use it and that behaviour happens without using wsl, using native windows
@aldarund Currently amplify-cli needs WSL to work. Could you try with WSL
hm. why it cant work on win without wsl? amplify configure worked fine.
amplify uses Gluegun and gluegun doesn't work well in windows without WSL. We have opened an issue with them.
This is happening to me too. I have installed WSL, but still doesnt work. Any idea?
@VetBoard Could you please provide the error stack trace?
I'm sorry but there is no error... it just stuck there, with the cursor blinking, but nothing happens just after I select the editor.
Yes, there no error stack trace. It just stuck doing nothing as in screenshot in my initial message
Same issue here, stuck on selecting default editor
I was pretty frustrating and I spent some time to look into it. This issue is caused by inquerier component.
Unfortunately amplify-cli is not using the same version of all the dependencies. CLI itself using 3.2.1 and it has this issue, from 5.0.0 it is fixed.
I tried the inquerier versions 1 by 1 and 5.0.0 is the first one which runs their pizza example well, all the others are stuck after printing the json.
Internally the main reason is the setRawMode call to stdio's handle in readline module, my guess is that some pieces were not closed properly and TTY got into an invalid state.
If someone could create a PR, all you've to do is to move all the packages.json from ^3.2.1 to ^6.0.0 for the inquerier component so that would be the same for all modules ;-)
Pizza example: https://github.com/SBoudrias/Inquirer.js/blob/master/packages/inquirer/examples/pizza.js
Repro if someone wants to try:
- npm init -y
- npm i --save [email protected] (or 6.0.0) to see the difference)
- node pizza.js
@kaustavghosh06 This has not fixed the issue. I have clean installed these and am still not able to run the commands.
The 0.1.32 version fixed the issue for me. I just did npm install -g @aws-amplify/cli and everything worked properly.
Thank you
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.