-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Please move @types references to devDependencies #195
Comments
Nevermind, after upgrading to the |
Thanks for reporting and resolving! |
This is still an issue. Would you be open to a PR that moves the @types dependencies to dev dependencies? The version of @types/express-serve-static-core that apollo-server-express depends on is incompatible with the version of @types/express I have installed:
Using a resolution fixes this. But @types shouldn't be in the dependencies to be honest. Especially not with a fixed version number. It prevents me from using a newer version as well as clashing if I use another package that depends on the same types package but with another version.
|
There have been problems with these particular types, generally speaking (DefinitelyTyped/DefinitelyTyped#40905). If this problem persists for you, please let us know, though we have tried multiple times to get this right as you'll note in the Generally speaking though, it is simply not sufficient to merely say that |
@abernix Right. If the types are reexported they need to be in the dependencies. But doesn't that sound like peerDeps? Like if I use different react components they won't depend on react but instead have react as a peer dep so I can choose what version of react I'm running. Same with packages that use singletons or share classes from a library like packages depending on prom client, mongoose or mongodb. That way the user of apollo still has to install them manually, but npm and yarn will let them know. And the concept of peerDeps is well understood on the ecosystem (hopefully). What do you think? |
Perhaps! We won't change patterns right now, but once the peer dependencies are (again) automatically installed in npm 7 (which is not yet (Worth noting that, with the exception of |
I'm getting the following conflict right now:
Please make the @types references be devDependencies so that they do not get installed in node_modules when installing graphql-server.
The text was updated successfully, but these errors were encountered: