MineDojo / Voyager

An Open-Ended Embodied Agent with Large Language Models
https://voyager.minedojo.org/
MIT License
5.67k stars 537 forks source link

node.js install error #179

Open fangd123 opened 4 days ago

fangd123 commented 4 days ago

when I ran the command

cd mineflayer-collectblock
npx tsc

I got the errors as follow:

src/CollectBlock.ts:71:59 - error TS2538: Type 'undefined' cannot be used as an index type.

71                                 bot.registry.blocksByName[closest.name];
                                                             ~~~~~~~~~~~~

src/CollectBlock.ts:75:61 - error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.

75                             const item = bot.registry.items[leastTool];
                                                               ~~~~~~~~~

Found 2 errors in the same file, starting at: src/CollectBlock.ts:71

I use node v22.11.0 and v18.20

lplombos commented 3 days ago

I have the exact same issue. Does anyone know how to solve it?