hiredis is not being installed
See original GitHub issue- Version: 2.7.1
- Platform: Node.js 8.1.3 / macOS 10.12.5
- Description: After running yarn or npm install on the project and while generating a webpack build I got this error
ERROR in ./node_modules/redis-parser/lib/hiredis.js
Module not found: Error: Can't resolve 'hiredis' in
error Command failed with exit code 2.
The webpack config is the following:
var path = require('path')
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: ['babel-loader']
}
]
},
target: 'node'
}
package.json
{
"version": "1.0.0",
"main": "src/index.js",
"license": "MIT",
"dependencies": {
"dotenv": "^4.0.0",
"koa": "^2.3.0",
"koa-bodyparser": "^4.2.0",
"koa-router": "^7.2.1",
"node-fetch": "^1.7.1",
"redis": "^2.7.1"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-loader": "^7.1.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-env": "^1.5.2",
"webpack": "^3.0.0"
},
"scripts": {
"start": "node dist/bundle",
"build": "webpack"
},
"babel": {
"presets": [
[
"env",
{
"targets": {
"node": "current"
}
}
]
],
"plugins": [
"transform-object-rest-spread",
"transform-class-properties"
]
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (3 by maintainers)
Top Results From Across the Web
Installing hiredis fails after upgrading to Python 3.8 #92 - GitHub
While installing hiredis after upgrading to Python 3.8, I am getting error saying error: command 'C:\\Program Files (x86)\\Microsoft Visual ...
Read more >Installing Hiredis with pip on windows machine - Stack Overflow
I read a lot of blogs and suggestions to this problem but i found no suitable answer. I tried "Windows GCC (MinGW) binaries...
Read more >[Resolved] Install hiredis failed arm directory or files not found
Hello, I'm trying an installation of Mastodon instance on tinkerboard running with Armbian OS. I follow this topic : documentation/Production-guide.md at ...
Read more >ERROR: Could not build wheels for hiredis in Python
To solve the error "Could not build wheels for hiredis", run the pip install --upgrade pip command to upgrade your pip version, install...
Read more >Getting Started - aioredis
This will install aioredis , async-timeout . ... pip install aioredis[hiredis] ... The commands will not be reflected in Redis until execute() is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Actually, that’s not an issue with Webpack. That’s an issue with how
redis-parser
usedhiredis
. This issue can be solved by upgrading toredis-parser
3.0, which solves exactly this issue.That must be related with webpack. I was solved this issue by using nodeExternals plugin in webpack config:
nodeExternals skips any module in node_modules folder at server side bundling.