Comments (7)
having the same issues
from nx.
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.
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.
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.
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.
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.
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)
- nx 19.6.3 cannot generate plugins TypeError: Cannot read properties of undefined (reading 'length') HOT 4
- Error "Could not execute command because the task graph has a circular dependency" after upgrading from 19.3.1 to 19.6.3
- Nx graph --print doesn't print anymore
- Error after generating react library in react-standalone example HOT 1
- NX 18 not detecting node 18 HOT 1
- Daemon process terminated and closed the connection
- NX Command Fails with "Compiling Terminating" When Running nx run-many --target=serve HOT 1
- nx-cloud record fails if nx cloud is down
- nx-cloud record doesn't work on windows
- Change detection working in one app and not working in other app using same component
- Bug: Nx/esbuild with bundle fail
- Nx Release detected changes to version but when committing there are no files to commit HOT 2
- NX Cloud (19.0.0) is preventing Angular development server from starting/running properly HOT 2
- Error: NG0203: inject() must be called from an injection context such as a constructor, a factory function' when trying to load host from shell HOT 2
- Update Angular Incremental Builds recipe to reflect needed executors for esbuild
- Unable to run nx-cloud with bun because lockfile is not found
- NX run-many function blocks building of some projects when using the 'watch' flag
- @nx/vite plugin fails to init
- It failed when building a next application with config `output:standalone`.
- Increase NX_SOCKET_DIR limit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx.