Error during `amplify init` process, unable to init a project
See original GitHub issueDescribe the bug
Unable to init a project.
To Reproduce Steps to reproduce the behavior:
- Go into an existing TypeScript project
- run
npm install @aws-amplify/cli - run
./node_modules/.bin/amplify init - answer questions.
- When it gets to question
Choose the type of that you're building (Use arrow keys), it shows no options. Pressing arrow keys does nothing (because there’s no options). - Pressing enter causes an error as follows:
❯ ./node_modules/.bin/amplify init
Note: It is recommended to run this command from the root of your app directory
? Enter a name for the project test
? Choose your default editor: Atom Editor
? Choose the type of app that you're building
/Users/trusktr/src/Signafy+mapper-annotated-scene/node_modules/gluegun/build/index.js:13
throw up;
^
TypeError: Cannot read property 'value' of undefined
at ListPrompt.getCurrentValue (/Users/trusktr/src/Signafy+mapper-annotated-scene/node_modules/@aws-amplify/cli/node_modules/inquirer/lib/prompts/list.js:121:53)
at MapSubscriber._next (/Users/trusktr/src/Signafy+mapper-annotated-scene/node_modules/rxjs/internal/operators/map.js:49:35)
at MapSubscriber.Subscriber.next (/Users/trusktr/src/Signafy+mapper-annotated-scene/node_modules/rxjs/internal/Subscriber.js:67:18)
at TakeSubscriber._next (/Users/trusktr/src/Signafy+mapper-annotated-scene/node_modules/rxjs/internal/operators/take.js:54:30)
at TakeSubscriber.Subscriber.next (/Users/trusktr/src/Signafy+mapper-annotated-scene/node_modules/rxjs/internal/Subscriber.js:67:18)
at Interface.handler (/Users/trusktr/src/Signafy+mapper-annotated-scene/node_modules/rxjs/internal/observable/fromEvent.js:22:28)
at Interface.emit (events.js:187:15)
at Interface._onLine (readline.js:290:10)
at Interface._line (readline.js:638:8)
at Interface._ttyWrite (readline.js:919:14)
Here’s what it looks like right when I get to the third prompt, before I press any arrow keys:
Signafy+mapper-annotated-scene git:feature/annotation-labels ❯ ./node_modules/.bin/amplify init
Note: It is recommended to run this command from the root of your app directory
? Enter a name for the project test
? Choose your default editor: Atom Editor
? Choose the type of app that you're building (Use arrow keys)
and there’s no options visible under that third prompt.
Expected behavior
To get through init process
Screenshots
Desktop (please complete the following information):
- OS: macOS Mojave
- Version:
❯ cat node_modules/@aws-amplify/cli/package.json | grep version
"version": "0.1.38"
Smartphone (please complete the following information):
N/A
Additional context
Let me know if you need any
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Get started - Typical workflows - AWS Amplify Docs
The init command goes through the following steps: Analyzes the project and confirms the frontend settings; Carries out the initialization logic of the ......
Read more >AWS Amplify, init failed - flutter - Stack Overflow
I'm trying to integrate AWS Amplify to my flutter project but having this issue while trying to run the amplify init command init...
Read more >Team workflows with Amplify backend environments
Create prod, test, and dev backend environments with the Amplify CLI. ... Install the Amplify CLI to initialize a new Amplify project.
Read more >Quickstart
The init process. $ amplify init. The init command must be executed at the root directory of a project to initialize the project...
Read more >AWS Amplify - There was an error initializing your environment
So, the time has come to pull your amplify project down to another development machine and you've run into the dreaded "There was...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Team,
I have a related issue: ./node_modules/.bin/amplify init doesnt behave like amplify init I need to execute it off project folder so that I can use it in CI/CD pipeline.
Let me know if there is a fix/workaround.
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
*-helpchannels for those types of questions.