-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Support Cookie 1.x #5231
Comments
I encountered this error today after updating dependencies to resolve a security warning about cross-spawn. After the updates, engine.io was installing cookie 0.7.2, but another package installed cookie 1.x, and it seems TypeScript was expecting engine.io to reference types from cookie 1.x. For now I was able to solve this by pinning the cookie package to the 0.7.2 version with the following addition to my
|
Release notes: https://github.com/jshttp/cookie/releases/tag/v1.0.0 The types are now included in the npm package. The `CookieSerializeOptions` type, which is used in our `ServerOptions` type, has been renamed to `SerializeOptions`, but there are no breaking change. Related: #5231
Thanks for the heads-up 👍 That's a bit weird, since we're using That being said, I think we will simply upgrade to |
A quick note here: I encountered this issue, because I had installed 'fastify', which some where in the dependency tree had a dependency to "cookie": "^1.0.1". Luckily I can get by without using fastify for now, but I will look forward to a upcoming release of socket.io, that depends on cookie@1. |
Is your feature request related to a problem? Please describe.
If for some reason cookie 1.x is installed the compilation fails with following error message.
node_modules/engine.io/build/server.d.ts:4:15 - error TS2724: '"cookie"' has no exported member named 'CookieSerializeOptions'. Did you mean 'SerializeOptions'?
Describe the solution you'd like
Obviously something needs to change. I guess CookieSerializeOptions was renamed to SerializeOptions?
Describe alternatives you've considered
Sticking with 0.7.2 but that's hardly a long term solution.
Additional context
I recon this is pretty straight forward.
The text was updated successfully, but these errors were encountered: