Langgraph JS CLI doesn't support Node versions other than v20. #311

Closed
opened 2026-02-15 18:15:47 -05:00 by yindo · 0 comments
Owner

Originally created by @devinmcgloin on GitHub (Jul 22, 2025).

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangGraph.js documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangGraph.js rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangGraph (or the specific integration package).

Example Code

I've set the node_version to 22, as suggested in https://github.com/langchain-ai/langgraphjs/issues/817. That works well in the langgraph platform but if I run langgraphjs dev locally it throws a zod validation error.

$ langgraphjs dev
error:   ▪ ZodError: [
  {
    "received": "22",
    "code": "invalid_literal",
    "expected": "20",
    "path": [
      "node_version"
    ],
    "message": "Invalid literal value, expected \"20\""
  }
]
    at get error (file:///Users/devinmcgloin/deca/deca-ai-api/node_modules/@langchain/langgraph-cli/node_modules/zod/v3/types.js:39:31)
    at ZodObject.parse (file:///Users/devinmcgloin/deca/deca-ai-api/node_modules/@langchain/langgraph-cli/node_modules/zod/v3/types.js:114:22)
    at getConfig (file:///Users/devinmcgloin/deca/deca-ai-api/node_modules/@langchain/langgraph-cli/dist/utils/config.mjs:93:29)
    at prepareContext (file:///Users/devinmcgloin/deca/deca-ai-api/node_modules/@langchain/langgraph-cli/dist/cli/dev.mjs:71:28)
    at async launchServer (file:///Users/devinmcgloin/deca/deca-ai-api/node_modules/@langchain/langgraph-cli/dist/cli/dev.mjs:108:46)

I believe this line needs to be updated:
https://github.com/langchain-ai/langgraphjs/blob/1e7857c1fcd4b733b4e898bf5cecbfb83ab589c9/libs/langgraph-cli/src/utils/config.mts#L63

Error Message and Stack Trace (if applicable)

No response

Description

I'm using the langgraph platform to run a agent that uses node_version 22, the cli however doesn't support v22 despite the platform supporting it.

System Info

$ yarn info @langchain/langgraph-cli --json | jq '.data.version'
"0.0.50"
yarn info v1.22.22
{
  name: '@langchain/langgraph-cli',
  'dist-tags': {
    next: '0.0.17',
    latest: '0.0.50'
  },
  versions: [
    '0.0.0-preview.4',
    '0.0.0-preview.5',
    '0.0.0-preview.6',
    '0.0.0-preview.7',
    '0.0.0-preview.8',
    '0.0.0-preview.9',
    '0.0.0-preview.10',
    '0.0.0-preview.11',
    '0.0.1',
    '0.0.2',
    '0.0.3',
    '0.0.4',
    '0.0.5',
    '0.0.6',
    '0.0.7',
    '0.0.8-dev.0',
    '0.0.8-dev.1',
    '0.0.8-dev.2',
    '0.0.8',
    '0.0.9',
    '0.0.10',
    '0.0.11',
    '0.0.12',
    '0.0.13',
    '0.0.14-experimental.0',
    '0.0.14-experimental.1',
    '0.0.14',
    '0.0.15',
    '0.0.16',
    '0.0.17',
    '0.0.18',
    '0.0.19',
    '0.0.20',
    '0.0.21',
    '0.0.22',
    '0.0.23',
    '0.0.24',
    '0.0.25',
    '0.0.26',
    '0.0.27',
    '0.0.28',
    '0.0.29',
    '0.0.30',
    '0.0.31',
    '0.0.32',
    '0.0.33',
    '0.0.34',
    '0.0.35',
    '0.0.36',
    '0.0.37',
    '0.0.38',
    '0.0.39',
    '0.0.40',
    '0.0.41',
    '0.0.42',
    '0.0.43',
    '0.0.44',
    '0.0.45',
    '0.0.46',
    '0.0.47',
    '0.0.48',
    '0.0.49',
    '0.0.50'
  ],
  time: {
    created: '2025-01-16T19:44:21.131Z',
    modified: '2025-07-17T23:23:36.719Z',
    '0.0.0-preview.4': '2025-01-16T19:44:21.454Z',
    '0.0.0-preview.5': '2025-01-17T02:19:43.328Z',
    '0.0.0-preview.6': '2025-01-17T14:07:36.353Z',
    '0.0.0-preview.7': '2025-01-17T18:03:39.769Z',
    '0.0.0-preview.8': '2025-01-17T21:35:51.508Z',
    '0.0.0-preview.9': '2025-01-17T23:48:46.300Z',
    '0.0.0-preview.10': '2025-01-19T23:04:22.618Z',
    '0.0.0-preview.11': '2025-01-20T16:25:43.259Z',
    '0.0.1': '2025-01-21T14:20:46.594Z',
    '0.0.2': '2025-01-22T14:53:36.978Z',
    '0.0.3': '2025-01-23T16:19:40.638Z',
    '0.0.4': '2025-01-24T14:51:59.575Z',
    '0.0.5': '2025-01-25T03:12:14.089Z',
    '0.0.6': '2025-01-28T01:57:08.896Z',
    '0.0.7': '2025-01-29T15:21:10.962Z',
    '0.0.8-dev.0': '2025-01-29T15:57:51.076Z',
    '0.0.8-dev.1': '2025-01-29T16:00:29.227Z',
    '0.0.8-dev.2': '2025-01-29T16:07:59.276Z',
    '0.0.8': '2025-01-29T18:58:09.804Z',
    '0.0.9': '2025-02-01T01:01:25.385Z',
    '0.0.10': '2025-02-05T00:26:03.065Z',
    '0.0.11': '2025-02-24T19:26:20.987Z',
    '0.0.12': '2025-02-25T13:47:22.826Z',
    '0.0.13': '2025-02-26T22:33:46.829Z',
    '0.0.14-experimental.0': '2025-03-03T18:02:38.456Z',
    '0.0.14-experimental.1': '2025-03-05T20:23:03.763Z',
    '0.0.14': '2025-03-06T15:01:30.221Z',
    '0.0.15': '2025-03-11T13:32:34.968Z',
    '0.0.16': '2025-03-12T22:16:49.174Z',
    '0.0.17': '2025-03-14T21:57:05.413Z',
    '0.0.18': '2025-03-20T14:30:00.385Z',
    '0.0.19': '2025-03-28T20:28:38.814Z',
    '0.0.20': '2025-04-02T15:23:57.638Z',
    '0.0.21': '2025-04-10T11:32:14.901Z',
    '0.0.22': '2025-04-15T16:04:16.904Z',
    '0.0.23': '2025-04-16T15:32:28.427Z',
    '0.0.24': '2025-04-17T14:39:05.285Z',
    '0.0.25': '2025-04-17T16:34:33.681Z',
    '0.0.26': '2025-04-17T22:40:02.167Z',
    '0.0.27': '2025-04-23T13:50:09.137Z',
    '0.0.28': '2025-04-24T10:55:17.188Z',
    '0.0.29': '2025-04-24T12:26:00.017Z',
    '0.0.30': '2025-04-30T08:38:44.794Z',
    '0.0.31': '2025-05-05T14:57:25.098Z',
    '0.0.32': '2025-05-05T16:25:15.660Z',
    '0.0.33': '2025-05-11T17:23:05.223Z',
    '0.0.34': '2025-05-13T23:37:43.580Z',
    '0.0.35': '2025-05-16T11:52:46.388Z',
    '0.0.36': '2025-05-20T12:27:54.013Z',
    '0.0.37': '2025-05-20T14:06:58.224Z',
    '0.0.38': '2025-05-31T00:01:05.999Z',
    '0.0.39': '2025-06-16T15:47:56.229Z',
    '0.0.40': '2025-06-17T18:17:53.792Z',
    '0.0.41': '2025-06-30T11:31:29.993Z',
    '0.0.42': '2025-07-07T13:31:32.613Z',
    '0.0.43': '2025-07-07T15:18:38.922Z',
    '0.0.44': '2025-07-09T12:48:43.752Z',
    '0.0.45': '2025-07-09T23:58:00.232Z',
    '0.0.46': '2025-07-14T22:25:52.618Z',
    '0.0.47': '2025-07-14T23:54:46.389Z',
    '0.0.48': '2025-07-17T01:08:06.683Z',
    '0.0.49': '2025-07-17T13:44:09.905Z',
    '0.0.50': '2025-07-17T23:23:36.079Z'
  },
  license: 'MIT',
  repository: {
    type: 'git',
    url: 'git@github.com:langchain-ai/langgraphjs-api.git'
  },
  maintainers: [
    {
      name: 'hwchase17',
      email: 'hw.chase.17@gmail.com'
    },
    {
      name: 'jacoblee93',
      email: 'jacoblee93@gmail.com'
    },
    {
      name: 'basproul',
      email: 'braceasproul@gmail.com'
    },
    {
      name: 'eric_langchain',
      email: 'eric@langchain.dev'
    },
    {
      name: 'andrewnguonly',
      email: 'andrewnguonly@gmail.com'
    },
    {
      name: 'nfcampos',
      email: 'nuno@boringbits.io'
    },
    {
      name: 'davidduong',
      email: 'david@duong.cz'
    },
    {
      name: 'maddyadams',
      email: 'madelyn.adams1@gmail.com'
    },
    {
      name: 'sam_noyes',
      email: 'sam@langchain.dev'
    },
    {
      name: 'hntrl',
      email: 'hunter@hntrl.io'
    }
  ],
  version: '0.0.50',
  type: 'module',
  engines: {
    node: '^18.19.0 || >=20.16.0'
  },
  main: './dist/server.mjs',
  types: './dist/server.d.mts',
  bin: {
    langgraphjs: 'dist/cli/cli.mjs'
  },
  scripts: {
    clean: 'rm -rf dist/ .turbo/',
    build: 'yarn turbo:command build:internal --filter=@langchain/langgraph-cli',
    'build:internal': 'yarn clean && node scripts/build.mjs',
    prepack: 'yarn run build',
    typecheck: 'tsc --noEmit',
    cli: 'tsx src/cli/cli.mts',
    'cli:watch': 'tsx watch src/cli/cli.mts',
    test: 'vitest run',
    format: 'prettier --write .',
    'format:check': 'prettier --check .'
  },
  dependencies: {
    '@babel/code-frame': '^7.26.2',
    '@commander-js/extra-typings': '^13.0.0',
    '@langchain/langgraph-api': '0.0.50',
    chokidar: '^4.0.3',
    commander: '^13.0.0',
    dedent: '^1.5.3',
    dotenv: '^16.4.7',
    execa: '^9.5.2',
    'exit-hook': '^4.0.0',
    'extract-zip': '^2.0.1',
    langsmith: '^0.3.33',
    open: '^10.1.0',
    'package-manager-detector': '^1.3.0',
    'stacktrace-parser': '^0.1.10',
    tar: '^7.4.3',
    winston: '^3.17.0',
    'winston-console-format': '^1.0.8',
    yaml: '^2.7.0',
    zod: '^3.23.8'
  },
  devDependencies: {
    '@types/babel__code-frame': '^7.0.6',
    '@types/node': '^18.15.11',
    prettier: '^2.8.3',
    tsx: '^4.19.3',
    typescript: '^4.9.5 || ^5.4.5',
    vitest: '^3.1.2'
  },
  gitHead: '8c58ad1fbcdae54b14342374a3915d3afca70b8d',
  dist: {
    shasum: 'fd3d573f560e067c4a15cf7ed6872b6f4314a7f8',
    integrity: 'sha512-BOQI0IRh7QxCQi568R5xmwQkt+DGGVLkZq9YHg8Lspq+69yIXpCT7pZekRwO+y//dpEiNP66x/MT56zmIiWmuA==',
    tarball: 'https://registry.npmjs.org/@langchain/langgraph-cli/-/langgraph-cli-0.0.50.tgz',
    fileCount: 25,
    unpackedSize: 82871,
    signatures: [
      {
        keyid: 'SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U',
        sig: 'MEUCIQD4foL845mxSKivFfNLoP/dfI70FfLhi/4rKrERyOcKeQIgEz4Xjfv56iqIvBJZR9HKKgZNlOQwFN/wR/SeMgzf+yk='
      }
    ]
  },
  directories: {}
}
Done in 0.15s.
Originally created by @devinmcgloin on GitHub (Jul 22, 2025). ### Checked other resources - [x] I added a very descriptive title to this issue. - [x] I searched the LangGraph.js documentation with the integrated search. - [x] I used the GitHub search to find a similar question and didn't find it. - [x] I am sure that this is a bug in LangGraph.js rather than my code. - [x] The bug is not resolved by updating to the latest stable version of LangGraph (or the specific integration package). ### Example Code I've set the node_version to 22, as suggested in https://github.com/langchain-ai/langgraphjs/issues/817. That works well in the langgraph platform but if I run `langgraphjs dev` locally it throws a zod validation error. ``` $ langgraphjs dev error: ▪ ZodError: [ { "received": "22", "code": "invalid_literal", "expected": "20", "path": [ "node_version" ], "message": "Invalid literal value, expected \"20\"" } ] at get error (file:///Users/devinmcgloin/deca/deca-ai-api/node_modules/@langchain/langgraph-cli/node_modules/zod/v3/types.js:39:31) at ZodObject.parse (file:///Users/devinmcgloin/deca/deca-ai-api/node_modules/@langchain/langgraph-cli/node_modules/zod/v3/types.js:114:22) at getConfig (file:///Users/devinmcgloin/deca/deca-ai-api/node_modules/@langchain/langgraph-cli/dist/utils/config.mjs:93:29) at prepareContext (file:///Users/devinmcgloin/deca/deca-ai-api/node_modules/@langchain/langgraph-cli/dist/cli/dev.mjs:71:28) at async launchServer (file:///Users/devinmcgloin/deca/deca-ai-api/node_modules/@langchain/langgraph-cli/dist/cli/dev.mjs:108:46) ``` I believe this line needs to be updated: https://github.com/langchain-ai/langgraphjs/blob/1e7857c1fcd4b733b4e898bf5cecbfb83ab589c9/libs/langgraph-cli/src/utils/config.mts#L63 ### Error Message and Stack Trace (if applicable) _No response_ ### Description I'm using the langgraph platform to run a agent that uses node_version 22, the cli however doesn't support v22 despite the platform supporting it. ### System Info ``` $ yarn info @langchain/langgraph-cli --json | jq '.data.version' "0.0.50" ``` ``` yarn info v1.22.22 { name: '@langchain/langgraph-cli', 'dist-tags': { next: '0.0.17', latest: '0.0.50' }, versions: [ '0.0.0-preview.4', '0.0.0-preview.5', '0.0.0-preview.6', '0.0.0-preview.7', '0.0.0-preview.8', '0.0.0-preview.9', '0.0.0-preview.10', '0.0.0-preview.11', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8-dev.0', '0.0.8-dev.1', '0.0.8-dev.2', '0.0.8', '0.0.9', '0.0.10', '0.0.11', '0.0.12', '0.0.13', '0.0.14-experimental.0', '0.0.14-experimental.1', '0.0.14', '0.0.15', '0.0.16', '0.0.17', '0.0.18', '0.0.19', '0.0.20', '0.0.21', '0.0.22', '0.0.23', '0.0.24', '0.0.25', '0.0.26', '0.0.27', '0.0.28', '0.0.29', '0.0.30', '0.0.31', '0.0.32', '0.0.33', '0.0.34', '0.0.35', '0.0.36', '0.0.37', '0.0.38', '0.0.39', '0.0.40', '0.0.41', '0.0.42', '0.0.43', '0.0.44', '0.0.45', '0.0.46', '0.0.47', '0.0.48', '0.0.49', '0.0.50' ], time: { created: '2025-01-16T19:44:21.131Z', modified: '2025-07-17T23:23:36.719Z', '0.0.0-preview.4': '2025-01-16T19:44:21.454Z', '0.0.0-preview.5': '2025-01-17T02:19:43.328Z', '0.0.0-preview.6': '2025-01-17T14:07:36.353Z', '0.0.0-preview.7': '2025-01-17T18:03:39.769Z', '0.0.0-preview.8': '2025-01-17T21:35:51.508Z', '0.0.0-preview.9': '2025-01-17T23:48:46.300Z', '0.0.0-preview.10': '2025-01-19T23:04:22.618Z', '0.0.0-preview.11': '2025-01-20T16:25:43.259Z', '0.0.1': '2025-01-21T14:20:46.594Z', '0.0.2': '2025-01-22T14:53:36.978Z', '0.0.3': '2025-01-23T16:19:40.638Z', '0.0.4': '2025-01-24T14:51:59.575Z', '0.0.5': '2025-01-25T03:12:14.089Z', '0.0.6': '2025-01-28T01:57:08.896Z', '0.0.7': '2025-01-29T15:21:10.962Z', '0.0.8-dev.0': '2025-01-29T15:57:51.076Z', '0.0.8-dev.1': '2025-01-29T16:00:29.227Z', '0.0.8-dev.2': '2025-01-29T16:07:59.276Z', '0.0.8': '2025-01-29T18:58:09.804Z', '0.0.9': '2025-02-01T01:01:25.385Z', '0.0.10': '2025-02-05T00:26:03.065Z', '0.0.11': '2025-02-24T19:26:20.987Z', '0.0.12': '2025-02-25T13:47:22.826Z', '0.0.13': '2025-02-26T22:33:46.829Z', '0.0.14-experimental.0': '2025-03-03T18:02:38.456Z', '0.0.14-experimental.1': '2025-03-05T20:23:03.763Z', '0.0.14': '2025-03-06T15:01:30.221Z', '0.0.15': '2025-03-11T13:32:34.968Z', '0.0.16': '2025-03-12T22:16:49.174Z', '0.0.17': '2025-03-14T21:57:05.413Z', '0.0.18': '2025-03-20T14:30:00.385Z', '0.0.19': '2025-03-28T20:28:38.814Z', '0.0.20': '2025-04-02T15:23:57.638Z', '0.0.21': '2025-04-10T11:32:14.901Z', '0.0.22': '2025-04-15T16:04:16.904Z', '0.0.23': '2025-04-16T15:32:28.427Z', '0.0.24': '2025-04-17T14:39:05.285Z', '0.0.25': '2025-04-17T16:34:33.681Z', '0.0.26': '2025-04-17T22:40:02.167Z', '0.0.27': '2025-04-23T13:50:09.137Z', '0.0.28': '2025-04-24T10:55:17.188Z', '0.0.29': '2025-04-24T12:26:00.017Z', '0.0.30': '2025-04-30T08:38:44.794Z', '0.0.31': '2025-05-05T14:57:25.098Z', '0.0.32': '2025-05-05T16:25:15.660Z', '0.0.33': '2025-05-11T17:23:05.223Z', '0.0.34': '2025-05-13T23:37:43.580Z', '0.0.35': '2025-05-16T11:52:46.388Z', '0.0.36': '2025-05-20T12:27:54.013Z', '0.0.37': '2025-05-20T14:06:58.224Z', '0.0.38': '2025-05-31T00:01:05.999Z', '0.0.39': '2025-06-16T15:47:56.229Z', '0.0.40': '2025-06-17T18:17:53.792Z', '0.0.41': '2025-06-30T11:31:29.993Z', '0.0.42': '2025-07-07T13:31:32.613Z', '0.0.43': '2025-07-07T15:18:38.922Z', '0.0.44': '2025-07-09T12:48:43.752Z', '0.0.45': '2025-07-09T23:58:00.232Z', '0.0.46': '2025-07-14T22:25:52.618Z', '0.0.47': '2025-07-14T23:54:46.389Z', '0.0.48': '2025-07-17T01:08:06.683Z', '0.0.49': '2025-07-17T13:44:09.905Z', '0.0.50': '2025-07-17T23:23:36.079Z' }, license: 'MIT', repository: { type: 'git', url: 'git@github.com:langchain-ai/langgraphjs-api.git' }, maintainers: [ { name: 'hwchase17', email: 'hw.chase.17@gmail.com' }, { name: 'jacoblee93', email: 'jacoblee93@gmail.com' }, { name: 'basproul', email: 'braceasproul@gmail.com' }, { name: 'eric_langchain', email: 'eric@langchain.dev' }, { name: 'andrewnguonly', email: 'andrewnguonly@gmail.com' }, { name: 'nfcampos', email: 'nuno@boringbits.io' }, { name: 'davidduong', email: 'david@duong.cz' }, { name: 'maddyadams', email: 'madelyn.adams1@gmail.com' }, { name: 'sam_noyes', email: 'sam@langchain.dev' }, { name: 'hntrl', email: 'hunter@hntrl.io' } ], version: '0.0.50', type: 'module', engines: { node: '^18.19.0 || >=20.16.0' }, main: './dist/server.mjs', types: './dist/server.d.mts', bin: { langgraphjs: 'dist/cli/cli.mjs' }, scripts: { clean: 'rm -rf dist/ .turbo/', build: 'yarn turbo:command build:internal --filter=@langchain/langgraph-cli', 'build:internal': 'yarn clean && node scripts/build.mjs', prepack: 'yarn run build', typecheck: 'tsc --noEmit', cli: 'tsx src/cli/cli.mts', 'cli:watch': 'tsx watch src/cli/cli.mts', test: 'vitest run', format: 'prettier --write .', 'format:check': 'prettier --check .' }, dependencies: { '@babel/code-frame': '^7.26.2', '@commander-js/extra-typings': '^13.0.0', '@langchain/langgraph-api': '0.0.50', chokidar: '^4.0.3', commander: '^13.0.0', dedent: '^1.5.3', dotenv: '^16.4.7', execa: '^9.5.2', 'exit-hook': '^4.0.0', 'extract-zip': '^2.0.1', langsmith: '^0.3.33', open: '^10.1.0', 'package-manager-detector': '^1.3.0', 'stacktrace-parser': '^0.1.10', tar: '^7.4.3', winston: '^3.17.0', 'winston-console-format': '^1.0.8', yaml: '^2.7.0', zod: '^3.23.8' }, devDependencies: { '@types/babel__code-frame': '^7.0.6', '@types/node': '^18.15.11', prettier: '^2.8.3', tsx: '^4.19.3', typescript: '^4.9.5 || ^5.4.5', vitest: '^3.1.2' }, gitHead: '8c58ad1fbcdae54b14342374a3915d3afca70b8d', dist: { shasum: 'fd3d573f560e067c4a15cf7ed6872b6f4314a7f8', integrity: 'sha512-BOQI0IRh7QxCQi568R5xmwQkt+DGGVLkZq9YHg8Lspq+69yIXpCT7pZekRwO+y//dpEiNP66x/MT56zmIiWmuA==', tarball: 'https://registry.npmjs.org/@langchain/langgraph-cli/-/langgraph-cli-0.0.50.tgz', fileCount: 25, unpackedSize: 82871, signatures: [ { keyid: 'SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U', sig: 'MEUCIQD4foL845mxSKivFfNLoP/dfI70FfLhi/4rKrERyOcKeQIgEz4Xjfv56iqIvBJZR9HKKgZNlOQwFN/wR/SeMgzf+yk=' } ] }, directories: {} } Done in 0.15s. ```
yindo closed this issue 2026-02-15 18:15:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#311