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
Module not found: Can't resolve 'apollo-server-errors' #156
Comments
Hmm, this may be caused by presence of |
|
I do know nothing about next.js framework, so it is hard to determine. Is it and your project TypeScript or pure JavaScript? Anyway, as I wrote before, for me the best solution should be to extract Apollo 3 plugin (and maybe even Envelop plugin) to separate files. But this is a breaking change, so I'd like to know @confuser opinion first, before I start to implement it. |
Agree that the solution would be to have separate plugins! |
Workaround: Create a
|
@velias I think the best solve which is a larger change is to create a monorepo with a core folder containing the main business logic and then each plugin being its own package. Otherwise it'll mean installing a bunch of dependencies that aren't needed just to cover multiple use cases |
Agree, this is indeed the right solution. But it is a bit larger change ;-) |
Given that Apollo 3 is not supported anymore it could be possible to simply remove Apollo 3 plugin at all with all its dependencies. Docs (https://www.apollographql.com/docs/apollo-server/previous-versions) says:
|
When importing this package into a next.js app, I get the following error. I believe because https://github.com/confuser/graphql-constraint-directive/blob/master/index.js#L135 attempts to
require('apollo-server-errors')
which is not a dependency of this package.I'm not really sure what an appropriate resolution here is, short of moving the individual library support to alternative packages.
The text was updated successfully, but these errors were encountered: