nx icon indicating copy to clipboard operation
nx copied to clipboard

> NX desiredImplicitDeps.filter is not a function

Open SPokhriyal123 opened this issue 1 year ago • 6 comments

Current Behavior

The application is not getting build while running the command ca-app:serve:alpha-next: It shows an error : > NX desiredImplicitDeps.filter is not a function

Expected Behavior

The application use to build and compile successfully after running ng run ca-app:serve:alpha-next

GitHub Repo

No response

Steps to Reproduce

  1. While doing migration from angular 14 to 15, ran the following commands:

  2. npm install -g nx@latest

  3. npm install -g @angular/[email protected]

  4. npm install -g @angular/[email protected]

  5. npm update nx --force

  6. ng update @angular/[email protected] @angular/[email protected] --force

  7. nx migrate latest

  8. npm install --force

  9. nx migrate --run-migrations

  10. ca-app:serve:alpha-next

After running the command ca-app:serve:alpha-next I am getting an error : > NX desiredImplicitDeps.filter is not a function

Note: I do not have any array named desiredImplicitDeps in my application.

Nx Report

>  NX   desiredImplicitDeps.filter is not a function

Failure Logs

No response

Operating System

  • [ ] macOS
  • [ ] Linux
  • [X] Windows
  • [ ] Other (Please specify)

Additional Information

No response

SPokhriyal123 avatar Jun 01 '23 12:06 SPokhriyal123

This issue is coming when we upgrade require('@nrwl/cli/lib/decorate-cli').decorateCli(); to require('nx/src/adapter/decorate-cli').decorateCli()

Please note that without this upgrade, npm install throws Error NX Decoration of the Angular CLI did not complete successfully. Hence we upgraded this .

Please suggest the reason and fix for same .

iamamanbhardwaj avatar Jun 01 '23 14:06 iamamanbhardwaj

Can you run nx report and get the output for us? Additionally, if you run with --verbose do you get a stack trace?

AgentEnder avatar Jun 01 '23 18:06 AgentEnder

image

SPokhriyal123 avatar Jun 02 '23 06:06 SPokhriyal123

@AgentEnder this issue of different from https://github.com/nrwl/nx/issues/17349 . but after solving one, other fails.

can you help us with this . i am not able to run any command for nx after this new package is used to decorate cli

iamamanbhardwaj avatar Jun 08 '23 09:06 iamamanbhardwaj

@AgentEnder yeah same for me, after change path of package to decorate cli i am also not able to run any nx commands

image

 npx nx report

 >  NX   Report complete - copy this into the issue template

   Node   : 18.16.0
   OS     : win32 x64
   npm    : 9.5.1
   Hasher : Native

   nx                 : 16.3.2
   @nx/js             : 16.3.2
   @nx/jest           : 16.3.2
   @nx/linter         : 16.3.2
   @nx/workspace      : 16.3.2
   @nx/angular        : 16.3.2
   @nx/cypress        : 16.3.2
   @nx/devkit         : 16.3.2
   @nx/eslint-plugin  : 16.3.2
   @nx/plugin         : 16.3.2
   @nx/storybook      : 16.3.2
   @nrwl/tao          : 16.3.2
   @nx/web            : 16.3.2
   @nx/webpack        : 16.3.2
   nx-cloud           : 16.0.5
   typescript         : 5.0.4
   ---------------------------------------
   Community plugins:
   @compodoc/compodoc : 1.1.21
   @storybook/angular : 7.1.0-alpha.32
   ngx-build-plus     : 16.0.0

UPDATE: solved it, had to upgrade nx globally aswell, after nx migrate

jerkovicl avatar Jun 13 '23 09:06 jerkovicl

is this issue getting any attention? @vsavkin @FrozenPandaz please tag someone who could help us with such errors!

iamamanbhardwaj avatar Jun 13 '23 10:06 iamamanbhardwaj

Just to confirm, do you all happen to have implicitDependencies: "*" anywhere? :eyes:

I suspect this could be the reason you are seeing this error.

FrozenPandaz avatar Jun 27 '23 20:06 FrozenPandaz

I updated the error messaging here. The error above was being thrown while validating workspace configuration when there were implicitDependencies which were not an array of strings. So it will remain an error, but the error will contain the information necessary to fix it.

FrozenPandaz avatar Jun 28 '23 13:06 FrozenPandaz

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[bot] avatar Jul 29 '23 00:07 github-actions[bot]