dkhunt27 / action-nx-affected-list

Git Action to get a list of affected nx projects (apps or libs)
MIT License
6 stars 7 forks source link

Error: Could not run NX cli #224

Open 2coo opened 1 year ago

2coo commented 1 year ago
Run dkhunt27/action-nx-affected-list@v4

nx run [project][:target][:configuration] [_..]

Run a target for a project
    (e.g., nx run myapp:serve:production).

    You can also use the infix notation to run a target:
    (e.g., nx serve myapp --configuration=production)

    You can skip the use of Nx cache by using the --skip-nx-cache option.

Options:
      --version           Show version number  [boolean]
  -c, --configuration     This is the configuration to use when performing tasks on projects  [string]
      --output-style      Defines how Nx emits outputs tasks logs  [string] [choices: "dynamic", "static", "stream", "stream-without-prefixes", "compact"]
      --exclude           Exclude certain projects from being processed  [string]
      --parallel          Max number of parallel processes [default is 3]  [string]
      --runner            This is the name of the tasks runner configured in nx.json  [string]
      --graph             Show the task graph of the command  [boolean] [default: false]
      --verbose           Prints additional information about the commands (e.g., stack traces)  [boolean]
      --nx-bail           Stop command execution after the first failed task  [boolean] [default: false]
      --nx-ignore-cycles  Ignore cycles in the task graph  [boolean] [default: false]
      --skip-nx-cache     Rerun the tasks even when the results are available in the cache  [boolean] [default: false]
      --project           Target project  [string]

Error: Both project and target have to be specified
    at parseRunOneOptions (/home/runner/work/dashboard/dashboard/node_modules/nx/src/command-line/run-one.js:94:[15](https://github.com/boostmn/dashboard/actions/runs/4920936524/jobs/8790288676#step:5:16))
    at Object.<anonymous> (/home/runner/work/dashboard/dashboard/node_modules/nx/src/command-line/run-one.js:23:22)
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/work/dashboard/dashboard/node_modules/tslib/tslib.js:[16](https://github.com/boostmn/dashboard/actions/runs/4920936524/jobs/8790288676#step:5:17)4:62)
/bin/sh: 1: nx: not found
Error: Could not run NX cli...Did you install it globally and in your project? Also, try adding this npm script: "nx":"nx"
2coo commented 1 year ago

nx affected:apps is deprecated since nx 16 that is why it fails

piotr-zasuwa-sollers-eu commented 9 months ago

Any updates about that?

2coo commented 8 months ago

@piotr-zasuwa-sollers-eu

you can use my fork https://github.com/marketplace/actions/action-nx-affected