Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class extends value undefined is not a constructor or null #539

Open
pnodet opened this issue Apr 21, 2024 · 3 comments
Open

Class extends value undefined is not a constructor or null #539

pnodet opened this issue Apr 21, 2024 · 3 comments

Comments

@pnodet
Copy link

pnodet commented Apr 21, 2024

dependencies:
- @socket.io/redis-adapter 8.2.1
+ @socket.io/redis-adapter 8.3.0
/Users/pnodet/backend/node_modules/.pnpm/@socket.io+redis-adapter@8.3.0_socket.io-adapter@2.5.2_bufferutil@4.0.8_/node_modules/@socket.io/redis-adapter/dist/sharded-adapter.js:27
class ShardedRedisAdapter extends socket_io_adapter_1.ClusterAdapter {
                                                      ^

TypeError: Class extends value undefined is not a constructor or null
    at Object.<anonymous> (/Users/pnodet/backend/node_modules/.pnpm/@socket.io+redis-adapter@8.3.0_socket.io-adapter@2.5.2_bufferutil@4.0.8_/node_modules/@socket.io/redis-adapter/dist/sharded-adapter.js:27:55)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Object.S (/Users/pnodet/backend/node_modules/.pnpm/tsx@4.7.2/node_modules/tsx/dist/cjs/index.cjs:1:1292)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/Users/pnodet/backend/node_modules/.pnpm/@socket.io+redis-adapter@8.3.0_socket.io-adapter@2.5.2_bufferutil@4.0.8_/node_modules/@socket.io/redis-adapter/dist/index.js:704:25)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Object.S (/Users/pnodet/backend/node_modules/.pnpm/tsx@4.7.2/node_modules/tsx/dist/cjs/index.cjs:1:1292)
❯ node -v
v20.10.0
"@socket.io/redis-adapter": "8.3.0",
"socket.io": "4.7.5"
@bruceCzK
Copy link

Same here.

@darrachequesne
Copy link
Member

What is your version of the socket.io-adapter package? It should be 2.5.4, isn't that the case?

See:

"peerDependencies": {
"socket.io-adapter": "^2.5.4"
},

@pnodet
Copy link
Author

pnodet commented Apr 23, 2024

Specifying the peerDependencies seems to solve the issue on my side, not sure why pnpm prefers installing 2.5.2 though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants