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

Cannot find eslint or jest when running inferred targets for 18.1.1 (and 18.1.2) #22343

Closed
1 of 4 tasks
atsjo opened this issue Mar 16, 2024 · 6 comments
Closed
1 of 4 tasks
Labels

Comments

@atsjo
Copy link

atsjo commented Mar 16, 2024

Current Behavior

cannot run inferred targets for eslint or jest, since eslint or jest command cannot be resolved.
fails with 'eslint' or 'jest' is not recognized as an internal or external command, operable program or batch file.

Expected Behavior

can run inferred targets for eslint or jest as in 18.0.8

GitHub Repo

No response

Steps to Reproduce

  1. update working 18.0.8 repo using eslint or jest inferred targets to 18.1.1
  2. run eslint or jest for inferred target on any project

Nx Report

Node   : 20.11.1
OS     : win32-x64
pnpm   : 8.15.4

nx                 : 18.1.1
@nx/js             : 18.1.1
@nx/jest           : 18.1.1
@nx/linter         : 18.1.1
@nx/workspace      : 18.1.1
@nx/angular        : 18.1.1
@nx/devkit         : 18.1.1
@nx/esbuild        : 18.1.1
@nx/eslint-plugin  : 18.1.1
@nrwl/tao          : 18.1.1
@nx/web            : 18.1.1
@nx/webpack        : 18.1.1
typescript         : 5.3.3
---------------------------------------
Community plugins:
angular-calendar : 0.31.0

Failure Logs

nx run shared-all:lint

'eslint' is not recognized as an internal or external command, operable program or batch file.

OR

nx run shared-all:test

'jest' is not recognized as an internal or external command, operable program or batch file.

Package Manager Version

No response

Operating System

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

Additional Information

No response

@jahusa02
Copy link

Got the same Problem

@MobliMic
Copy link

I'm having the same issue. Tried downgrading nx to 18.0.8 and now its running the targets just fine.

Started a brand new project today. Installed nx globally and was seeing this issue. I then ran the same targets using npx nx lint [application] and that seemed to run just fine.

nx report (not working)

Node   : 20.11.1
OS     : win32-x64
npm    : 10.2.4

nx (global)        : 18.1.1
nx                 : 18.1.1
@nx/js             : 18.1.1
@nx/jest           : 18.1.1
@nx/linter         : 18.1.1
@nx/eslint         : 18.1.1
@nx/workspace      : 18.1.1
@nx/devkit         : 18.1.1
@nx/eslint-plugin  : 18.1.1
@nx/next           : 18.1.1
@nx/playwright     : 18.1.1
@nx/react          : 18.1.1
@nrwl/tao          : 18.1.1
@nx/web            : 18.1.1
@nx/webpack        : 18.1.1
typescript         : 5.3.3

nx report (working)

Node   : 20.11.1
OS     : win32-x64
npm    : 10.2.4

nx (global)        : 18.0.8
nx                 : 18.0.8
@nx/js             : 18.0.8
@nx/jest           : 18.0.8
@nx/linter         : 18.0.8
@nx/eslint         : 18.0.8
@nx/workspace      : 18.0.8
@nx/devkit         : 18.0.8
@nx/eslint-plugin  : 18.0.8
@nx/next           : 18.0.8
@nx/playwright     : 18.0.8
@nx/react          : 18.0.8
@nrwl/tao          : 18.0.8
@nx/web            : 18.0.8
@nx/webpack        : 18.0.8
typescript         : 5.3.3

Im still having issues with build, but that is relating to next and tailwind and believe that to be a configuration issue i need to resolve on my part but I've not changed anything from the default configuration using npx create-nx-workspace so thought was worth mentioning incase it is somehow tangentially related. (see image)

image

@atsjo atsjo changed the title Cannot find eslint or jest when running inferred targets for 18.1.1 Cannot find eslint or jest when running inferred targets for 18.1.1 (and 18.1.2) Mar 18, 2024
@atsjo
Copy link
Author

atsjo commented Mar 18, 2024

18.1.2 does not fix this...

@atsjo
Copy link
Author

atsjo commented Mar 18, 2024

tried setting env variable NX_RUN_COMMANDS_DIRECTLY=false. This didn't fix it, but got another error message:

nx run shared-all:lint

^[[6;1R

and then the command just hangs.... (can break it via ctrl-c)

@FrozenPandaz FrozenPandaz added the scope: core core nx functionality label Mar 18, 2024
@FrozenPandaz
Copy link
Collaborator

Closed by #22382

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 Apr 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants