我该如何在我的包裹里加上hiredis呢?json文件吗?

时间:2022-05-23 07:15:02

I see that installing hiredis requires a format I've not seen before. Instead of the expected:

我看到安装hiredis需要一种我以前没见过的格式。而不是预期的:

npm install hiredis

...the format is actually:

…格式是:

npm install hiredis redis

How should I go about adding hiredis to my package.json dependencies so that it installs properly?

我该如何把hiredis添加到我的包中呢?json依赖项,以便正确安装?

1 个解决方案

#1


3  

The redis module will automatically use hiredis if it's available.

如果可以,redis模块将自动使用hiredis。

npm install redis hiredis

is identical to

是一样

npm install redis
npm install hiredis

In short, just include it in your package.json like any other module.

简而言之,把它包括在你的包里。json和其他模块一样。

"dependencies": {
  "redis": "",
  "hiredis": ""
}

#1


3  

The redis module will automatically use hiredis if it's available.

如果可以,redis模块将自动使用hiredis。

npm install redis hiredis

is identical to

是一样

npm install redis
npm install hiredis

In short, just include it in your package.json like any other module.

简而言之,把它包括在你的包里。json和其他模块一样。

"dependencies": {
  "redis": "",
  "hiredis": ""
}