Skip to content

[apollo-express-server] Missing dependency on express #3238

@mwaldstein

Description

@mwaldstein

apollo-express-server has a dependency on express to run (see

) but it isn't listed in the dependencies of its package.json -

Typically, this shouldn't cause issues as you'd only be using it in an express-based project, but if you aren't directly including express but instead using a private wrapper package which adds boilerplate, npm won't know to make express available to apollo-express-server, throwing the error:

internal/modules/cjs/loader.js:584                                                                                                                                                     throw err;
    ^

Error: Cannot find module 'express'

The solution is to add express to either the dependencies or peerDependencies of apollo-express-server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions