redis 套件的 Property 'on' does not exist on type 'RedisClientType'


Sep 29, 2022

再用 typescript 開發時發現 client.on('error', (err) => console.log('Redis Client Error', err)); 會跳出錯誤 Property 'on' does not exist on type 'RedisClientType' ,加上 npm i -D @types/node 就解決了

#TypeScript #VS Code #Redis #nodejs #ts #js #Node






你可能感興趣的文章

Don’t break the Web:以 SmooshGate 以及 keygen 為例

Don’t break the Web:以 SmooshGate 以及 keygen 為例

交換資料 - 表單、Ajax、XMLHttpRequest、CORS、JSONP

交換資料 - 表單、Ajax、XMLHttpRequest、CORS、JSONP

物聯網初體驗:樹莓派與 Golang

物聯網初體驗:樹莓派與 Golang






留言討論






2
2
2