Skip to content
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

Webpack Incompatible #11

Open
mplaxton opened this issue Oct 25, 2018 · 1 comment
Open

Webpack Incompatible #11

mplaxton opened this issue Oct 25, 2018 · 1 comment

Comments

@mplaxton
Copy link

mplaxton commented Oct 25, 2018

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

@cramhead
Copy link

cramhead commented Oct 5, 2020

Seems to work with webpack now. I'm using 0.4.0 with webpack: 4.43.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants