-
Notifications
You must be signed in to change notification settings - Fork 50
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
Error: Command failed: npx nx affected:graph | nx-ignore #388
Comments
My specific error: Cloning completed: 409.534ms
Running "pnpm dlx nx-ignore test-app --verbose"
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +7
+++++++
Progress: resolved 7, reused 0, downloaded 7, added 7, done
≫ Using Nx to determine if this project (test-app) is affected by the commit...
≫ Running from /vercel/.local/share/pnpm/store/v3/tmp/dlx-85/node_modules/.pnpm/[email protected]/node_modules/nx-ignore/src
≫ Workspace root is /vercel/path0
≫ Creating temp folder to install Nx: /tmp/.nx-ignore
≫ Adding plugin @nx/[email protected]
≫ Adding plugin @nx/[email protected]
≫ Adding plugin @nx/[email protected]
≫ Adding @nx/devkit
Found pnpm version 8.15.6
.
Using pnpm to install Nx.
≫ Found Nx at version 18.2.4
≫ Validating base ref: 6f27b0282e12af9a46cf05c3b67248893dc262f2
≫ Comparing 6f27b0282e12af9a46cf05c3b67248893dc262f2...HEAD
node:internal/errors:984
const err = new Error(message);
^
Error: Command failed: npx nx affected:graph --base=6f27b0282e12af9a46cf05c3b67248893dc262f2 --head=HEAD --file=/tmp/.nx-affected-graph.json
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:890:11)
at execSync (node:child_process:962:15)
at main (/vercel/.local/share/pnpm/store/v3/tmp/dlx-85/node_modules/.pnpm/[email protected]/node_modules/nx-ignore/src/index.js:60:5)
at Object.<anonymous> (/vercel/.local/share/pnpm/store/v3/tmp/dlx-85/node_modules/.pnpm/[email protected]/node_modules/nx-ignore/src/index.js:27:1)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12) {
status: 1,
signal: null,
output: [
null,
Buffer(81) [Uint8Array] [
10, 32, 78, 88, 32, 32, 32, 70, 97, 105, 108, 101,
100, 32, 116, 111, 32, 112, 114, 111, 99, 101, 115, 115,
32, 112, 114, 111, 106, 101, 99, 116, 32, 103, 114, 97,
112, 104, 46, 10, 10, 80, 97, 115, 115, 32, 45, 45,
118, 101, 114, 98, 111, 115, 101, 32, 116, 111, 32, 115,
101, 101, 32, 116, 104, 101, 32, 115, 116, 97, 99, 107,
116, 114, 97, 99, 101, 115, 46, 10, 10
],
Buffer(0) [Uint8Array] []
],
pid: 253,
stdout: Buffer(81) [Uint8Array] [
10, 32, 78, 88, 32, 32, 32, 70, 97, 105, 108, 101,
100, 32, 116, 111, 32, 112, 114, 111, 99, 101, 115, 115,
32, 112, 114, 111, 106, 101, 99, 116, 32, 103, 114, 97,
112, 104, 46, 10, 10, 80, 97, 115, 115, 32, 45, 45,
118, 101, 114, 98, 111, 115, 101, 32, 116, 111, 32, 115,
101, 101, 32, 116, 104, 101, 32, 115, 116, 97, 99, 107,
116, 114, 97, 99, 101, 115, 46, 10, 10
],
stderr: Buffer(0) [Uint8Array] []
} |
@mattleong Can you run |
Can you also paste the results of |
@jaysoo No issue locally ~/dev/repo main ❯ npx nx affected:graph --base=6f27b0282e12af9a46cf05c3b67248893dc262f2 --head=HEAD --file=/tmp/.nx-affected-graph.json 07:58:40 AM
NX Use `nx graph --affected`, or `nx affected --graph` instead depending on which best suits your use case. The `affected:graph` command will be removed in Nx 19.
NX JSON output contains deprecated fields:
- affectedProjects
- criticalPath
These fields will be removed in Nx 19. If you need to see which projects were affected, use `nx show projects --affected`.
NX JSON output created in /tmp
/tmp/.nx-affected-graph.json NX Report ~/dev/repo main* ❯ pnpm dlx nx report 12:02:11 PM
.../Library/pnpm/store/v3/tmp/dlx-23216 | +111 +++++++++++
.../Library/pnpm/store/v3/tmp/dlx-23216 | Progress: resolved 120, reused 111, downloaded 0, added 111, done
NX Report complete - copy this into the issue template
Node : 20.11.0
OS : darwin-x64
pnpm : 8.5.1
nx (global) : 18.2.4
nx : 18.2.4
@nx/js : 18.2.4
@nx/jest : 18.2.4
@nx/eslint : 18.2.4
@nx/workspace : 18.2.4
@nx/eslint-plugin : 18.2.4
@nx/next : 18.2.4
@nx/react : 18.2.4
@nrwl/tao : 18.2.4
@nx/vite : 18.2.4
@nx/web : 18.2.4
typescript : 5.4.5
---------------------------------------
Registered Plugins:
@nx/next/plugin
@nx/jest/plugin
@nx/eslint/plugin |
@mattleong If you have a public repo that we can check that will help a lot in debugging this issue. Otherwise, I'll try to reproduce it, but it will take longer to fix. |
@jaysoo unforunately, it's not public at the moment. I'll let you know if I can change that |
I have a similar problem, and since I see there are many (see some related issues below) issues already created for this, I wonder if I should create a separate one. My issue is the following:
Tried with node 18 at first, and got the same error, However, if i Run the command as sugested:
I get no errors
and the file's content:
Related Issues |
@Bulletninja @mattleong Can you try again with the latest version? I made two changes:
|
Great @jaysoo, I just reinstalled and now it works, thanks! |
@jaysoo Sorry for the delay Using npm WARN exec The following package was not found and will be installed: [email protected]
15:45:14.258 | ≫ Using Nx to determine if this project (test-app) is affected by the commit...
15:46:02.512 | node:fs:582
15:46:02.513 | return binding.open(
15:46:02.513 | ^
15:46:02.513 |
15:46:02.513 | Error: ENOENT: no such file or directory, open '/tmp/.nx-affected-graph.json'
15:46:02.514 | at Object.openSync (node:fs:582:18)
15:46:02.514 | at readFileSync (node:fs:461:35)
15:46:02.514 | at main (/vercel/.npm/_npx/cf7fc04e3df2a243/node_modules/nx-ignore/src/index.js:75:33)
15:46:02.514 | at Object.<anonymous> (/vercel/.npm/_npx/cf7fc04e3df2a243/node_modules/nx-ignore/src/index.js:33:1)
15:46:02.514 | at Module._compile (node:internal/modules/cjs/loader:1369:14)
15:46:02.514 | at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
15:46:02.515 | at Module.load (node:internal/modules/cjs/loader:1206:32)
15:46:02.515 | at Module._load (node:internal/modules/cjs/loader:1022:12)
15:46:02.515 | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
15:46:02.515 | at node:internal/main/run_main_module:28:49 {
15:46:02.515 | errno: -2,
15:46:02.515 | code: 'ENOENT',
15:46:02.516 | syscall: 'open',
15:46:02.516 | path: '/tmp/.nx-affected-graph.json'
15:46:02.516 | }
15:46:02.516 |
@jaysoo I can confirm this is broken now with NX 19.0.3, and nx-ignore 18.3.7 |
Ok so removing node modules and package lock and reinstalling seems to do the trick |
I'm seeing this issue with NX v18.2.4 and nx-ignore v18.0.2
Originally posted by @mattleong in #178 (comment)
The text was updated successfully, but these errors were encountered: