-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Description
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:
- Install socket.io-client:
npm install socket.io-client
- Check version in main package.json:
cat node_modules/socket.io-client/package.json | grep version
- Check version in nested package.json:
cat node_modules/socket.io-client/build/esm/package.json | grep version
- 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",
...
},