aws-amplify / aws-amplify/amplify-cli

"Choose the type of app you're building" empty when installed locally

Open
#4,043 7 comments 15 reactions 1 assignee Assigned to @renebrandel View on GitHub
feature-request p3 platform strategic
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

**Describe the bug**
In order to ensure that all builders (developers and CI/CD environments) use the same version of build toolchains, a common pattern is to include build/test requirements under `devDependencies` in the project's `package.json` rather than relying on a global installation of the tool and execute it via e.g. `$(npm bin)/amplify`. Attempting to do this with the amplify CLI results in the init prompt `Choose the type of app you're building` having no options and crashing.

**Amplify CLI Version**
`$(npm bin)/amplify -v` gives `4.18.0`

**To Reproduce**
In an empty folder, `npm install --save-dev @aws-amplify/cli && $(npm bin)/amplify init`. Fill out the prompts until you get to `Choose the type of app you're building` - no entries are listed, and attempting to accept the default causes a `Cannot read property 'value' of undefined` error.

**Expected behavior**
The same behavior as a globally-installed version (in my case, presenting the options `android`, `ios`, and `javascript`).

**Desktop (please complete the following information):**
- OS: Debian 9 on WSL on Windows Server 2019 v1809
- Node Version: 13.13.0

**Additional context**
after running `rm -r * && npm install --save-dev @aws-amplify/cli`, my `package-lock.json` is as attached (uploaded as txt because github doesn't allow attaching json files to issues):
[package-lock.json.txt](https://github.com/aws-amplify/amplify-cli/files/4518647/package-lock.json.txt)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.