cd Odyssey/odyssey/env/mineflayer/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
Mineflayer recommends using a Node.js version between 16 and 18, but I can run it locally with v20.17.0 as well. I suspect that your issue might be caused by the Node.js version being too high.
when I ran the command
I got the errors as follow:
I use node v22.11.0