TypeError:错误的输入类型"字符串"对于args

时间:2018-06-04 10:00:36

标签: node.js caching redis

我试图在nodejs和redisql之间创建连接我在创建名为TypeError: Wrong input type "String" for args的表时遇到了问题 堆栈跟踪将在帖子的末尾添加,我添加了

const redisql = require('redisql');
const sqlClient = redisql.createClient();
sqlClient.create_table("employee", " id int , name TEXT , salary double ", redisql.print);

一旦我运行第三个命令,我就会得到这个堆栈跟踪

TypeError: Wrong input type "String" for args
    at RedisClient.send_command.RedisClient.sendCommand (d:\BuildProjects\redisproject\node_modules\redis\lib\extendedApi.js:27:19)
    at rsql_send_command (d:\BuildProjects\redisproject\node_modules\redisql\index.js:28:22)
    at RedisClient.proto.CREATE_TABLE (d:\BuildProjects\redisproject\node_modules\redisql\index.js:47:5)
    at new Cache (d:\BuildProjects\redisproject\app\index.js:11:15)
    at Object.<anonymous> (d:\BuildProjects\redisproject\app\index.js:45:20)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (d:\BuildProjects\redisproject\index.js:1:77)
    at Module._compile (module.js:649:14)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
Waiting for the debugger to disconnect...
TypeError: Wrong input type "String" for args
extendedApi.js:27
    at RedisClient.send_command.RedisClient.sendCommand (d:\BuildProjects\redisproject\node_modules\redis\lib\extendedApi.js:27:19)
    at rsql_send_command (d:\BuildProjects\redisproject\node_modules\redisql\index.js:28:22)
    a

我按照这个项目link来构建我的

不知道为什么,我深深阅读了代码,似乎应该没问题。有人能帮帮我吗?

0 个答案:

没有答案