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






你可能感興趣的文章

動手實現 Redux(一):dispatch 修改共享狀態

動手實現 Redux(一):dispatch 修改共享狀態

一起來了解 Web Authentication

一起來了解 Web Authentication

[Py 百日馬 Day 5] for 迴圈 (for loop)

[Py 百日馬 Day 5] for 迴圈 (for loop)






留言討論