nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.69k stars 2.37k forks source link

Can't create packages via nx g create-package #19265

Closed ErickRodrCodes closed 7 months ago

ErickRodrCodes commented 1 year ago

Current Behavior

So, I felt today to generate an nx plugin for tauri, so I decided to run npx nx generate create-package --project taurix --dry-run in a clean Nx 16.8.1. I'm getting this annoying message:

image

(Note that I went over the inquirer file and threw away a console.log of it to see what is blocking the choice to be selectable, and I see "selectable" to be an empty array, so it is failing because of this)

Expected Behavior

Well, I should be able to create a plugin directory where I can create a Nx plugin for tauri.

GitHub Repo

No response

Steps to Reproduce

machine specs: Windows 10 pro 22H2 Node.js 18.18.0

commands run:

  1. npx create-nx-workspace@latest: Selected Empty stack, with integrated monorepo, then cd to the new workspace
  2. run npx nx generate create-package --project taurix --dry-run
  3. I got this message: image

Nx Report

>  NX   Report complete - copy this into the issue template

   Node   : 18.18.0
   OS     : win32-x64
   npm    : 9.8.1

   nx             : 16.8.1
   @nx/js         : 16.8.1
   @nx/jest       : 16.8.1
   @nx/linter     : 16.8.1
   @nx/workspace  : 16.8.1
   @nx/devkit     : 16.8.1
   @nx/plugin     : 16.8.1
   @nrwl/tao      : 16.8.1
   typescript     : 5.1.6

Failure Logs

C:\git-projects\tbogard\node_modules\enquirer\lib\types\array.js:39
      throw new Error('At least one choice must be selectable');
            ^

Error: At least one choice must be selectable
    at AutoComplete.reset (C:\git-projects\tbogard\node_modules\enquirer\lib\types\array.js:39:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AutoComplete.initialize (C:\git-projects\tbogard\node_modules\enquirer\lib\types\array.js:25:5)
    at async C:\git-projects\tbogard\node_modules\enquirer\lib\prompt.js:236:7

Package Manager Version

npm 9.8.1

Operating System

Additional Information

No response

ErickRodrCodes commented 1 year ago

I think I found the problem: It seems I need to have an e2e plugin installed. without it, it breaks! so it seems the plugin requires you to have an e2e, which is not really part of a dependency.

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏

github-actions[bot] commented 6 months ago

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.