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

the error on run "npx tsc" #150

Closed
kobeap opened this issue Mar 27, 2024 · 4 comments
Closed

the error on run "npx tsc" #150

kobeap opened this issue Mar 27, 2024 · 4 comments

Comments

@kobeap
Copy link

kobeap commented Mar 27, 2024

npx tsc
src/BlockVeins.ts:25:32 - error TS2345: Argument of type 'import("/home/gjb/DRL/Voyager/voyager/env/mineflayer/node_modules/mineflayer/node_modules/prismarine-block/index").Block' is not assignable to parameter of type 'import("/home/gjb/DRL/Voyager/voyager/env/mineflayer/node_modules/prismarine-block/index").Block'.
The types returned by 'getProperties()' are incompatible between these types.
Type '{ [key: string]: string | number | boolean; }' is not assignable to type '{ [key: string]: string | number; }'.
'string' index signatures are incompatible.
Type 'string | number | boolean' is not assignable to type 'string | number'.
Type 'boolean' is not assignable to type 'string | number'.

25 if (targets.includes(neighbor)) continue
~~~~~~~~

src/BlockVeins.ts:26:29 - error TS2345: Argument of type 'import("/home/gjb/DRL/Voyager/voyager/env/mineflayer/node_modules/mineflayer/node_modules/prismarine-block/index").Block' is not assignable to parameter of type 'import("/home/gjb/DRL/Voyager/voyager/env/mineflayer/node_modules/prismarine-block/index").Block'.

26 if (open.includes(neighbor)) continue
~~~~~~~~

src/BlockVeins.ts:28:21 - error TS2345: Argument of type 'import("/home/gjb/DRL/Voyager/voyager/env/mineflayer/node_modules/mineflayer/node_modules/prismarine-block/index").Block' is not assignable to parameter of type 'import("/home/gjb/DRL/Voyager/voyager/env/mineflayer/node_modules/prismarine-block/index").Block'.

28 open.push(neighbor)
~~~~~~~~

src/CollectBlock.ts:209:23 - error TS2345: Argument of type 'import("/home/gjb/DRL/Voyager/voyager/env/mineflayer/node_modules/prismarine-block/index").Block' is not assignable to parameter of type 'import("/home/gjb/DRL/Voyager/voyager/env/mineflayer/node_modules/mineflayer/node_modules/prismarine-block/index").Block'.
Type 'Block' is missing the following properties from type 'Block': setSignText, getSignText

209 await bot.dig(block);
~~~~~

Found 4 errors in 2 files.

Errors Files
3 src/BlockVeins.ts:25
1 src/CollectBlock.ts:209
my version of Node.js is v20.11.1 and npm is 10.5.0

@jcobol
Copy link

jcobol commented Apr 4, 2024

I have the same error, but on Windows.
Node v20.11.1.
npm 10.2.4

@jw1yuan
Copy link

jw1yuan commented Apr 10, 2024

Bump prismarine-block to 1.17.1
#138 (comment)

@romechenko
Copy link
Contributor

Thanks I had same issue and @jw1yuan's comment solved it

@kobeap kobeap closed this as completed Apr 12, 2024
@kobeap
Copy link
Author

kobeap commented Apr 12, 2024

i solve it

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

4 participants