Skip to content

Version mismatch between socket.io-client/package.json and socket.io-client/build/esm/package.json #5369

@SamuelRott

Description

@SamuelRott

Describe the bug
The socket.io-client package contains two package.json files with mismatched version numbers. The main package.json at the root shows one version, while the nested package.json in node_modules/socket.io-client/build/esm/package.json shows a different version.
This creates confusion about which version is actually installed and causes issues.

Steps to reproduce the version mismatch:

  1. Install socket.io-client: npm install socket.io-client
  2. Check version in main package.json: cat node_modules/socket.io-client/package.json | grep version
  3. Check version in nested package.json: cat node_modules/socket.io-client/build/esm/package.json | grep version
  4. Compare the two version numbers

Expected behavior
Both package.json files should contain the same version number since they represent the same package installation. The nested package.json in build/esm/ is used to mark the directory as ES modules but should reflect the same version as the main package.

Actual behavior
The version numbers differ between:

  • node_modules/socket.io-client/package.json (shows version 4.8.1)
  • node_modules/socket.io-client/build/esm/package.json (shows version 4.7.5)

Additional context
We use module federation in our app, and the manifes.json generated on build end up with the mismatch.

    {
      ...
      "name": "socket.io-client",
      "version": "4.7.5",
      "requiredVersion": "^4.8.1",
      ...
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    to triageWaiting to be triaged by a member of the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions