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

find-cache-dir version 4.0.0 is not compatible nx version 16.5.0 #18046

Closed
1 of 4 tasks
alisafariir opened this issue Jul 10, 2023 · 3 comments
Closed
1 of 4 tasks

find-cache-dir version 4.0.0 is not compatible nx version 16.5.0 #18046

alisafariir opened this issue Jul 10, 2023 · 3 comments
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug

Comments

@alisafariir
Copy link

Current Behavior

I created a project with the latest version of NX and built a library inside it. When I try to build the library, the following error is displayed.

 >  NX   require() of ES Module C:\projects\my-nx\node_modules\find-cache-dir\index.js from C:\projects\my-nx\node_modules\@nx\angular\src\executors\package\ng-packagr-adjustments\ng-package\options.di.js not supported.

This error was related to changing the import structure of the find-cache-dir package, and when I installed version 3.3.2, the problem was solved.

Expected Behavior

Apparently, the nx v 16.5.0 is not compatible with the latest version of find-cache-dir

GitHub Repo

No response

Steps to Reproduce

1.npx create-nx-workspace@latest
2.nx g @nx/angular:library my-lib --publishable --import-path=@my-org/my-lib
3.nx build my-lib
4. NX require() of ES Module C:\projects\my-nx\node_modules\find-cache-dir\index.js from C:\projects\my-nx\node_modules@nx\angular\src\executors\package\ng-packagr-adjustments\ng-package\options.di.js not supported.

Nx Report

Node   : 18.16.0
   OS     : win32-x64
   npm    : 9.7.1

   nx (global)        : 16.5.0
   nx                 : 16.5.0
   @nx/js             : 16.5.0
   @nx/jest           : 16.5.0
   @nx/linter         : 16.5.0
   @nx/workspace      : 16.5.0
   @nx/angular        : 16.5.0
   @nx/cypress        : 16.5.0
   @nx/devkit         : 16.5.0
   @nx/eslint-plugin  : 16.5.0
   @nrwl/tao          : 16.5.0
   @nx/web            : 16.5.0
   @nx/webpack        : 16.5.0
   typescript         : 5.1.6
   ---------------------------------------
   Local workspace plugins:
         @my-org/my-lib

Failure Logs

NX   require() of ES Module C:\projects\my-nx\node_modules\find-cache-dir\index.js from C:\projects\my-nx\node_modules\@nx\angular\src\executors\package\ng-packagr-adjustments\ng-package\options.di.js not supported.

Operating System

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

Additional Information

No response

@alisafariir alisafariir changed the title find-cache-dir v 4.0.0 is not compatible nx 16.5.0 find-cache-dir version 4.0.0 is not compatible nx version 16.5.0 Jul 10, 2023
@mandarini mandarini added the scope: angular Issues related to Angular support in Nx label Jul 10, 2023
@leosvelperez
Copy link
Member

This was fixed by #18049 and it should be part of a release soon. Please keep an eye on the releases to get the fix. In the meantime, if you need a workaround urgently, you can add find-cache-dir to your package.json with version ^3.3.2.

@julianpoemp
Copy link

still an issue in Nx 15.9.4. Installing find-cache-dir@^3.3.2 fixed it for me, thanks!

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

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 Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
Development

No branches or pull requests

4 participants