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
hiredis is not being installed #1254
Comments
That must be related with webpack. I was solved this issue by using nodeExternals plugin in webpack config: const nodeExternals = require('webpack-node-externals')
module.exports = {
...
externals: [nodeExternals()],
target: 'node'
} nodeExternals skips any module in node_modules folder at server side bundling. |
This is an issue with webpack. |
Actually, that's not an issue with Webpack. That's an issue with how |
@guidobouman how can we use |
@guidobouman any valid JS code should be fine for @peterschussheim I do not have a lot of capacity to work on node_redis at the moment and that's pretty sad. Upgrading only the redis-parser would be a semver-major bump though. |
@BridgeAR See NodeRedis/node-redis-parser#36 The missing reference was the underlying issue with Webpack. Removing hiredis completely also fixed that bug as "collateral damage". As to why one would run webpack on server related code: serverless environments might run old versions of Node while someone wants to be able to use modern syntax like imports. (https://github.com/serverless-heaven/serverless-webpack) @peterschussheim I see another option aside from bumping the version for Actually, @BridgeAR: This could go as a patch version bump as it's a bugfix. But yes, it drops Node versions below 4, even though they have been EOL for quite some time. |
@guidobouman Thank you very much for that suggestion. Although it is a 'hack', i'll accept it since I can't waste more time than I already have due to this problem. Perhaps this is a good opportunity for myself or others in the community to release a 'modern' version (very, very sad that we are holding off from changes like this because of node 4 support). 👎 |
Can someone please explain how to fix this issue? I don't understand why I still need to add |
After all of adjustments(change to target: 'node' and additionally install 'hiredis'), still there seems be |
This issue is still relevant, as hiredis is abonded and failed to install in Node 12, redis-parser remove it on v3.0.0 but this package still using v2.6.0. |
Also seeing this when trying to bundle with parceljs via:
I am curious to see what we get when bundling (tree shaking, optimizing for containerization, etc.). Minification or not, I would like to see the results of this if it worked. We'll stick with |
Hiredis isn't abandon (last PR was 10 days ago). However, I'd entertain a PR @sookoll for an update to 3.0. |
Sorry, I mean hiredis-node obviously. Didn't think that somebody could think out of node environment here. |
For anyone running into this, the fix is to upgrade to v3.x which doesn't use hiredis anymore: https://github.com/redis/node-redis/blob/master/CHANGELOG.md#breaking-changes-1 |
The webpack config is the following:
package.json
The text was updated successfully, but these errors were encountered: