-
Notifications
You must be signed in to change notification settings - Fork 343
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
Unable to upgrade connect-redis@6.1.3 to connect-redis@7.0.1 [typescript] #387
Comments
The issue here is your are passing the session object into connect-redis. That is no longer required and will cause this error. See the migration notes for more details: |
No, I'm not passing session object to connect-redis, this line is commented out:
The problem is located here:
I'm sorry but release notes do not mention this issue. How can I address that? |
Ahh sorry, I must have looked at the wrong commit. The issue you have with the above code is you are not initializing the constructor with |
Yes, that is also why I've commented out with
The following code:
will cause Typescript to fail with error:
|
Hmmm.. I cannot duplicate that error with your repo locally. The errors go away when I add |
That didn't work on my side. I'm facing this issue on multiple projects / environments / workstations. Do you have connect-redis linked locally on your workstation via |
No link locally (I wondered the same earlier and double checked). I am running this against the published 7.0.1 release and have tried on multiple environments as well with the same result. Hmm... have you been able to replicate on say a Docker container or something so we could try the same environment? Wish I could be of more help here... |
Thanks for your time. I must say I see such thing for the first time. This repo works on one workstation, but results in error mentioned above on another ¯_(ツ)_/¯. Same version of node is used. I tried to reboot, remove ~/.npm, remove package-lock, node_modules, reinstall deps. The funny thing is that when vscode complains, npm start also complains. If it works in one, it works in both. I will keep looking into that. Or future release of connect-redis will solve the feature automagically just bacause of version bump. |
@hvqzao I have same issue, but solve with removed |
Hi @jackey8616 thank you for the support! |
Hi,
First, I've read Release notes for 7.0.0, and I've attempted to migrate my code.
I'm removing @types/connect-redis@0.0.20, upgrading connect-redis to connect-redis@7.0.1 and making changes in code.
I can't make Typescript to stop complaining and just compile the code.
I see others are also struggling, so I've created simplest possible repo with this specific case in mind: https://github.com/hvqzao/cr-701
(first commit is the old version which works with no issues and second which does not).
The error I'm getting is:
Could you please tell me what I'm doing wrong?
Thank you & sorry for the hassle!
The text was updated successfully, but these errors were encountered: