You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NX Failed to create nodes
An error occurred while processing files for the @nx/js/typescript plugin.
- packages/foo/tsconfig.json: Failed to convert JavaScript value `Null` into rust type `String`
Error: Failed to convert JavaScript value `Null` into rust type `String`
at hashArray (/path/to/sample-workspace/node_modules/nx/src/hasher/file-hasher.js:9:12)
at createNodesInternal (/path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:97:50)
at /path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:95
at /path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/utils.js:10:33
at Array.map (<anonymous>)
at createNodesFromFiles (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/utils.js:8:35)
at exports.createNodesV2 (/path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:60)
at LoadedNxPlugin.createNodes (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/internal-api.js:34:65)
at LoadedNxPlugin.createNodes.<computed> (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/internal-api.js:44:34)
- ...
Other commands fail with:
NX Failed to process project graph. Run "nx reset" to fix this. Please report the issue
Expected Behavior
Nx should be able to process the project graph when a project doesn't create a lockfile (package-lock.json in my example).
NX Report complete - copy this into the issue template
Node : 20.5.1
OS : darwin-arm64
Native Target : aarch64-macos
npm : 10.9.2
nx (global) : 20.2.2
nx : 20.2.2
@nx/js : 20.2.2
@nx/workspace : 20.2.2
@nx/devkit : 20.2.2
typescript : 5.6.3
---------------------------------------
Registered Plugins:
@nx/js/typescript
---------------------------------------
⚠️ Unable to construct project graph.
Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
An error occurred while processing files for the @nx/js/typescript plugin.
- packages/bar/tsconfig.json: Failed to convert JavaScript value `Null` into rust type`String`
Error: Failed to convert JavaScript value `Null` into rust type`String`
at hashArray (/path/to/sample-workspace/node_modules/nx/src/hasher/file-hasher.js:9:12)
at createNodesInternal (/path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:97:50)
at /path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:95
at /path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/utils.js:10:33
at Array.map (<anonymous>)
at createNodesFromFiles (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/utils.js:8:35)
at exports.createNodesV2 (/path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:60)
at LoadedNxPlugin.createNodes (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/internal-api.js:34:65)
at LoadedNxPlugin.createNodes.<computed> (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/internal-api.js:44:34)
at createNodes (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/isolation/plugin-worker.js:71:63)
- packages/bar/tsconfig.lib.json: Failed to convert JavaScript value `Null` into rust type`String`
Error: Failed to convert JavaScript value `Null` into rust type`String`
at hashArray (/path/to/sample-workspace/node_modules/nx/src/hasher/file-hasher.js:9:12)
at createNodesInternal (/path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:97:50)
at /path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:95
at /path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/utils.js:10:33
at Array.map (<anonymous>)
at createNodesFromFiles (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/utils.js:8:35)
at exports.createNodesV2 (/path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:60)
at LoadedNxPlugin.createNodes (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/internal-api.js:34:65)
at LoadedNxPlugin.createNodes.<computed> (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/internal-api.js:44:34)
at createNodes (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/isolation/plugin-worker.js:71:63)
- packages/foo/tsconfig.json: Failed to convert JavaScript value `Null` into rust type`String`
Error: Failed to convert JavaScript value `Null` into rust type`String`
at hashArray (/path/to/sample-workspace/node_modules/nx/src/hasher/file-hasher.js:9:12)
at createNodesInternal (/path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:97:50)
at /path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:95
at /path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/utils.js:10:33
at Array.map (<anonymous>)
at createNodesFromFiles (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/utils.js:8:35)
at exports.createNodesV2 (/path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:60)
at LoadedNxPlugin.createNodes (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/internal-api.js:34:65)
at LoadedNxPlugin.createNodes.<computed> (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/internal-api.js:44:34)
at createNodes (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/isolation/plugin-worker.js:71:63)
- packages/foo/tsconfig.lib.json: Failed to convert JavaScript value `Null` into rust type`String`
Error: Failed to convert JavaScript value `Null` into rust type`String`
at hashArray (/path/to/sample-workspace/node_modules/nx/src/hasher/file-hasher.js:9:12)
at createNodesInternal (/path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:97:50)
at /path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:95
at /path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/utils.js:10:33
at Array.map (<anonymous>)
at createNodesFromFiles (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/utils.js:8:35)
at exports.createNodesV2 (/path/to/sample-workspace/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:60)
at LoadedNxPlugin.createNodes (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/internal-api.js:34:65)
at LoadedNxPlugin.createNodes.<computed> (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/internal-api.js:44:34)
at createNodes (/path/to/sample-workspace/node_modules/nx/src/project-graph/plugins/isolation/plugin-worker.js:71:63)
Failure Logs
Package Manager Version
No response
Operating System
macOS
Linux
Windows
Other (Please specify)
Additional Information
The error messages refer to the null value created when hashing this path:
Current Behavior
nx graph
outputs an error for each tsconfig file in agdz/sample-workspace:Other commands fail with:
Expected Behavior
Nx should be able to process the project graph when a project doesn't create a lockfile (package-lock.json in my example).
GitHub Repo
https://github.com/adgoudz/sample-workspace
Steps to Reproduce
npx nx graph
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
The error messages refer to the
null
value created when hashing this path:https://github.com/nrwl/nx/blob/master/packages/js/src/plugins/typescript/plugin.ts#L219
The text was updated successfully, but these errors were encountered: