Giter Club home page Giter Club logo

Comments (7)

marekhuckmann avatar marekhuckmann commented on September 17, 2024 4

having the same issues

from nx.

AgentEnder avatar AgentEnder commented on September 17, 2024 4

Hey, I agree this isn't great. There is something in our native code causing the open handle. While we get this figured out, you can add forceExit to your jest config. We'll be investigating this soon to try to figure out the root cause.

from nx.

alexandr2110pro avatar alexandr2110pro commented on September 17, 2024 2

Hey there! Any plans to solve this?

Same thing on MacOS and Nx v19.7.1

Node           : 20.17.0
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.7.1

nx                 : 19.6.1
@nx/js             : 19.6.1
@nx/jest           : 19.6.1
@nx/linter         : 19.6.1
@nx/eslint         : 19.6.1
@nx/workspace      : 19.6.1
@nx/devkit         : 19.6.1
@nx/eslint-plugin  : 19.6.1
@nx/plugin         : 19.6.1
@nx/rollup         : 19.6.1
@nrwl/tao          : 19.6.1
typescript         : 5.5.4
---------------------------------------
Registered Plugins:
@nx/rollup/plugin
@nx/eslint/plugin
@nx/jest/plugin
---------------------------------------
Local workspace plugins:
	 @easybread/recommended

from nx.

jonthomp avatar jonthomp commented on September 17, 2024

We're having this issue after trying to upgrade from 18 to 19.5.1, have also tried 19.4.2.

macOS Sonoma
Node 21.7.0
NPM 10.5.0

Seems to impact all imports from @nx/devkit.

from nx.

jyannessa-mtx avatar jyannessa-mtx commented on September 17, 2024

Also running into the same issue, which appears to be linked to flaky long running tests on CI. The stacktrace seems to always point to the first import of @nx/devkit or import { libraryGenerator } from '@nx/js';

Node   : 20.11.0
OS     : darwin-arm64
npm    : 10.2.4

nx                 : 19.5.2
@nx/js             : 19.5.2
@nx/jest           : 19.5.2
@nx/linter         : 19.5.2
@nx/eslint         : 19.5.2
@nx/workspace      : 19.5.2
@nx/angular        : 19.5.2
@nx/cypress        : 19.5.2
@nx/devkit         : 19.5.2
@nx/eslint-plugin  : 19.5.2
@nx/nest           : 19.5.2
@nx/node           : 19.5.2
@nx/plugin         : 19.5.2
@nx/storybook      : 19.5.2
@nrwl/tao          : 19.5.2
@nx/web            : 19.5.2
@nx/webpack        : 19.5.2
typescript         : 5.3.3
---------------------------------------
Community plugins:
@fortawesome/angular-fontawesome : 0.14.1
@ngneat/spectator                : 14.0.0
@storybook/angular               : 8.0.10
ng-mocks                         : 14.12.1
ngx-bootstrap                    : 12.0.0
---------------------------------------
Local workspace plugins:
         @mtx/nx-plugin

from nx.

blcoyote avatar blcoyote commented on September 17, 2024

Posting to say we're seeing the same issue with "@nx/devkit": "19.5.7",

` PASS workspace-plugin libs/workspace-plugin/src/executors/build/executor.spec.ts
● Console

console.log
  Executor ran for Build {}

  at runExecutor (src/executors/build/executor.ts:4:11)

Test Suites: 2 passed, 2 total
Tests: 13 passed, 13 total
Snapshots: 0 total
Time: 2.103 s
Ran all test suites.

Jest has detected the following 2 open handles potentially keeping Jest from exiting:

● CustomGC

> 1 | import { readProjectConfiguration, Tree } from '@nx/devkit';
    | ^
  2 | import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
  3 |
  4 | import generator, { LibraryScopes, LibraryTypes } from './generator';

  at Runtime._loadModule (../../node_modules/jest-runtime/build/index.js:1018:29)
  at requireNative (../../node_modules/nx/src/native/native-bindings.js:159:16)
  at Object.<anonymous> (../../node_modules/nx/src/native/native-bindings.js:332:17)
  at Object.<anonymous> (../../node_modules/nx/src/native/index.js:91:21)
  at Object.<anonymous> (../../node_modules/nx/src/daemon/client/client.js:23:18)
  at Object.<anonymous> (../../node_modules/nx/src/project-graph/project-graph.js:12:18)
  at Object.<anonymous> (../../node_modules/nx/src/project-graph/file-utils.js:17:25)
  at Object.<anonymous> (../../node_modules/nx/src/utils/package-manager.js:24:22)
  at Object.<anonymous> (../../node_modules/nx/src/utils/package-json.js:16:27)
  at Object.<anonymous> (../../node_modules/nx/src/project-graph/plugins/loader.js:13:24)
  at Object.<anonymous> (../../node_modules/nx/src/project-graph/plugins/index.js:6:16)
  at Object.<anonymous> (../../node_modules/nx/src/devkit-exports.js:12:17)
  at Object.<anonymous> (../../node_modules/@nx/devkit/index.js:17:22)
  at Object.<anonymous> (src/generators/new-selfservice-lib/generator.spec.ts:1:1)

● TTYWRAP

  173 | async function generatReactLibrary(tree: Tree, options: NormalizedSchema) {
  174 |   console.log('Generating React style library');
> 175 |   await reactLibraryGenerator(tree, {
      |   ^
  176 |     name: options.name,
  177 |     directory: options.projectDirectory,
  178 |     tags: options.parsedTags,

  at node_modules/get-stdin/index.js (../../node_modules/prettier/third-party.js:8690:7)
  at __require (../../node_modules/prettier/third-party.js:6:50)
  at Object.<anonymous> (../../node_modules/prettier/third-party.js:8976:13)
  at src/config/resolve-config.js (../../node_modules/prettier/index.js:18407:22)
  at __require (../../node_modules/prettier/index.js:1748:51)
  at src/common/get-file-info.js (../../node_modules/prettier/index.js:18796:19)
  at __require (../../node_modules/prettier/index.js:1748:51)
  at Object.<anonymous> (../../node_modules/prettier/index.js:38172:19)
  at ensurePackage (../../node_modules/@nx/devkit/src/utils/package-json.js:280:16)
  at initGenerator (../../node_modules/@nx/js/src/generators/init/init.js:106:32)
  at async libraryGeneratorInternal (../../node_modules/@nx/react/src/generators/library/library.js:39:24)
  at async libraryGenerator (../../node_modules/@nx/react/src/generators/library/library.js:24:12)
  at async generatReactLibrary (src/generators/new-selfservice-lib/generator.ts:175:3)
  at async _default (src/generators/new-selfservice-lib/generator.ts:66:5)
  at async Object.<anonymous> (src/generators/new-selfservice-lib/generator.spec.ts:22:5)`

from nx.

csk-trackunit avatar csk-trackunit commented on September 17, 2024

Having the same issue, and it seems related to readProjectConfiguration.

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

  ●  CustomGC

    > 1 | import { Tree, readProjectConfiguration } from "@nx/devkit";
        | ^
      2 | import { createTreeWithEmptyWorkspace } from "@nx/devkit/testing";
      3 | import nxLibGenerator, { NxLibSchema } from "./generator";
      4 |

      at Runtime._loadModule (../../../node_modules/.store/jest-runtime-npm-29.7.0-120fa64128/node_modules/jest-runtime/build/index.js:1018:29)
      at requireNative (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/native/native-bindings.js:159:16)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/native/native-bindings.js:332:17)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/native/index.js:91:21)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/daemon/client/client.js:23:18)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/project-graph/project-graph.js:12:18)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/project-graph/file-utils.js:17:25)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/utils/package-manager.js:24:22)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/utils/package-json.js:16:27)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/project-graph/plugins/loader.js:13:24)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/project-graph/plugins/index.js:6:16)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/devkit-exports.js:12:17)
      at Object.<anonymous> (../../../node_modules/.store/@nx-devkit-virtual-d6924ab5c7/node_modules/@nx/devkit/index.js:17:22)
      at Object.<anonymous> (src/generators/nx-lib/generator.spec.ts:1:1)

After removing the readProjectConfiguration import from our test, the open handle is detected in the generator and not directly in the test.

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

  ●  CustomGC

    > 1 | import {
        | ^
      2 |   formatFiles,
      3 |   generateFiles,
      4 |   getWorkspaceLayout,

      at Runtime._loadModule (../../../node_modules/.store/jest-runtime-npm-29.7.0-120fa64128/node_modules/jest-runtime/build/index.js:1018:29)
      at requireNative (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/native/native-bindings.js:159:16)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/native/native-bindings.js:332:17)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/native/index.js:91:21)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/daemon/client/client.js:23:18)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/project-graph/project-graph.js:12:18)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/project-graph/file-utils.js:17:25)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/utils/package-manager.js:24:22)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/utils/package-json.js:16:27)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/project-graph/plugins/loader.js:13:24)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/project-graph/plugins/index.js:6:16)
      at Object.<anonymous> (../../../node_modules/.store/nx-virtual-34e0a58c63/node_modules/nx/src/devkit-exports.js:12:17)
      at Object.<anonymous> (../../../node_modules/.store/@nx-devkit-virtual-d6924ab5c7/node_modules/@nx/devkit/index.js:17:22)
      at Object.<anonymous> (src/generators/nx-lib/generator.ts:1:1)
      at Object.<anonymous> (src/generators/nx-lib/generator.spec.ts:3:1)

from nx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.