Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node.js install error #179

Open
fangd123 opened this issue Nov 18, 2024 · 2 comments
Open

node.js install error #179

fangd123 opened this issue Nov 18, 2024 · 2 comments

Comments

@fangd123
Copy link

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
Copy link

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

@electronic-pig
Copy link

same error...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants