Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npx nx init breaking #17234

Closed
2 of 4 tasks
leopascual opened this issue May 25, 2023 · 3 comments Β· Fixed by #17238
Closed
2 of 4 tasks

npx nx init breaking #17234

leopascual opened this issue May 25, 2023 · 3 comments Β· Fixed by #17238
Assignees
Labels

Comments

@leopascual
Copy link

Current Behavior

NX 🐳 Nx initialization

NX πŸ§‘β€πŸ”§ Please answer the following questions about the scripts found in your package.json in order to generate task runner configuration

/Users/lpascual/.npm/_npx/973fb08ee51bb939/node_modules/enquirer/lib/types/array.js:38
throw new Error('At least one choice must be selectable');

Expected Behavior

Following https://nx.dev/recipes/adopting-nx-angular/angular-multiple steps on video, breaks when trying to init nx on mono repo, with two angular cli apps in apps folder.

GitHub Repo

nrwl/nx

Steps to Reproduce

  1. minute 9:15 of site video https://nx.dev/recipes/adopting-nx-angular/angular-multiple

Nx Report

╰─ sudo npx nx init                
Need to install the following packages:
  [email protected]
Ok to proceed? (y) y

 >  NX   🐳 Nx initialization


 >  NX   πŸ§‘β€πŸ”§ Please answer the following questions about the scripts found in your package.json in order to generate task runner configuration

/Users/lpascual/.npm/_npx/973fb08ee51bb939/node_modules/enquirer/lib/types/array.js:38
      throw new Error('At least one choice must be selectable');
            ^

Error: At least one choice must be selectable
    at MultiSelect.reset (/Users/lpascual/.npm/_npx/973fb08ee51bb939/node_modules/enquirer/lib/types/array.js:38:13)
    at async MultiSelect.initialize (/Users/lpascual/.npm/_npx/973fb08ee51bb939/node_modules/enquirer/lib/types/array.js:25:5)
    at async /Users/lpascual/.npm/_npx/973fb08ee51bb939/node_modules/enquirer/lib/prompt.js:236:7

Node.js v18.16.0

Failure Logs

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Package JSON file
{
"name": "utm-nx-client",
"author": "",
"version": "0.0.0",
"private": true,
"dependencies": {
"@angular/animations": "^14.2.0",
"@angular/common": "^14.2.0",
"@angular/compiler": "^14.2.0",
"@angular/core": "^14.2.0",
"@angular/forms": "^14.2.0",
"@angular/material": "^14.2.7",
"@angular/platform-browser": "^14.2.0",
"@angular/platform-browser-dynamic": "^14.2.0",
"@angular/router": "^14.2.0",
"bootstrap": "^5.2.3",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4",
"oidc-client": "1.7.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.11",
"@angular/cli": "~14.2.11",
"@angular/compiler-cli": "^14.2.0",
"@types/jasmine": "~4.0.0",
"jasmine-core": "~4.3.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.7.2"
}
}

@leosvelperez
Copy link
Member

Thanks for reporting this!

I pushed a fix for this. If you want to unblock yourself without waiting for a release with the fix, please add an empty script to your package.json and then run nx init again, e.g:

{
  ...
  "scripts": {
    "noop": "echo"
  },
  ...
}

@leopascual
Copy link
Author

πŸ‘ Worked Great haha. Thanks so much.

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants