Skip to content

Webpack Incompatible #11

@mplaxton

Description

@mplaxton

Hi,

I've found that if I use the graphql-kafka-subscriptions module (0.2.3) with webpack then I get the following error when the module is required:

path.js:28
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at dirname (path.js:1349:5)
    at Function.getRoot (webpack:///./node_modules/bindings/bindings.js?:151:13)
    at bindings (webpack:///./node_modules/bindings/bindings.js?:60:32)
    at eval (webpack:///./node_modules/node-rdkafka/librdkafka.js?:10:87)
    at Object../node_modules/node-rdkafka/librdkafka.js (/home/vagrant/Git/money-management/subscription-server/dist/app.js:468:1)
    at __webpack_require__ (/home/vagrant/Git/money-management/subscription-server/dist/app.js:20:30)
    at eval (webpack:///./node_modules/node-rdkafka/lib/client.js?:14:13)
    at Object../node_modules/node-rdkafka/lib/client.js (/home/vagrant/Git/money-management/subscription-server/dist/app.js:355:1)
    at __webpack_require__ (/home/vagrant/Git/money-management/subscription-server/dist/app.js:20:30)

This is simple to reproduce by requiring the module in the webpack startup target, e.g

const { KafkaPubSub } = require('graphql-kafka-subscriptions');

It would be great if the module was compatible with webpack.

Kind regards,
Matt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions