Skip to content

TypeError: cookieParser is not a function after upgrading to 0.26.1 #1415

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

Closed
chrisjaimes opened this issue Sep 14, 2020 · 1 comment
Closed
Labels
type/bug Something is not working the way it should

Comments

@chrisjaimes
Copy link

I upgraded nexus from 0.25.0 to 0.26.1. I had to update my server settings for cors as shown in #380 after the upgrade and it works fine, but I am still getting an Error for cookieParser when trying to pass the function as an express middleware.

I have the following code:

import * as bodyParser from "body-parser";
server.express.use(cookieParser())

Error:

✕ nexus reflection failed
  | error  TypeError: cookieParser is not a function

Any ideas how to solve this? It was working fine before I upgraded, thanks!

@chrisjaimes chrisjaimes added the type/bug Something is not working the way it should label Sep 14, 2020
@chrisjaimes
Copy link
Author

I am closing this issue as it can be solved by changing the way we import cookieParser

import cookieParser from 'cookie-parser';

Not sure why the other one was working before the upgrade though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is not working the way it should
Projects
None yet
Development

No branches or pull requests

1 participant