Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Deprecation warning with VS Code extensions using Node.js v20+: "navigator is now a global in nodejs" #1122

@EhabY

Description

@EhabY

Warning in VS Code 1.101+:

2025-11-02 01:39:50.792 [warning] [Deprecation Warning] 'PendingMigrationError' is deprecated. navigator is now a global in nodejs, please see https://aka.ms/vscode-extensions/navigator for additional info on this error.
 FROM: PendingMigrationError: navigator is now a global in nodejs, please see https://aka.ms/vscode-extensions/navigator for additional info on this error.

Root Cause

Node.js v21+ introduced navigator as a global object (https://nodejs.org/en/blog/release/v21.2.0). The library contains checks like:

if (typeof navigator !== 'undefined') {
  // browser-specific code
}

It seems the following 3 places violate this rule:

  • Browser detection logic in lib/jsbn.js -> Faulty Node.JS check
  • Entropy collection in lib/random.js -> Might be faulty since some Node.JS versions have a navigator object that is unlike the browser one
  • Hardware concurrency in lib/util.js -> Technically valid

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions