我编译一个项目的时候出现下面的问题,不知道该怎样下手修改它
发布于 3 年前 作者 sunboy25 1859 次浏览 来自 问答

我编译一个项目的时候出现下面的问题,不知道该怎样下手修改它,那位高手能指点一下方向? /bin/node /home/sunboy25/IotHub_Server-master/IotHub_Server-master/bin/www dns.js:94 throw new ERR_INVALID_ARG_TYPE(‘hostname’, [‘string’, ‘falsy’], hostname); ^

TypeError [ERR_INVALID_ARG_TYPE]: The “hostname” argument must be one of type string or falsy. Received type object at lookup (dns.js:94:11) at net.js:1004:5 at defaultTriggerAsyncIdScope (internal/async_hooks.js:294:19) at lookupAndConnect (net.js:1003:3) at Socket.connect (net.js:938:5) at Object.connect (net.js:157:17) at RedisClient.create_stream (/home/sunboy25/IotHub_Server-master/IotHub_Server-master/node_modules/redis/index.js:251:31) at new RedisClient (/home/sunboy25/IotHub_Server-master/IotHub_Server-master/node_modules/redis/index.js:159:10) at Object.exports.createClient (/home/sunboy25/IotHub_Server-master/IotHub_Server-master/node_modules/redis/index.js:1089:12) at Object.<anonymous> (/home/sunboy25/IotHub_Server-master/IotHub_Server-master/models/redis.js:2:22) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17)

Process finished with exit code 1

4 回复

直接上源码

我的问题是在一项目中,不知道怎样上传附件这是项目的git下载地址链接:IotHub,麻烦高手帮忙下载看一下的?

检查一下你的变量:process.env.REDIS_URL 是不是没有启 redis 服务?

@g8up 看过了,服务正常启动。

回到顶部