MineDojo / Voyager

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

error when using npx-tsc in mineflayer-collectblock folder #112

Closed Toisoi closed 11 months ago

Toisoi commented 11 months ago

python 3.10.6 nodejs 20.4.0

When trying use npx tsc in mineflayer-collectblock folder i get this error

src/BlockVeins.ts:2:10 - error TS2305: Module '"prismarine-block"' has no exported member 'Block'.

2 import { Block } from 'prismarine-block'
           ~~~~~

src/CollectBlock.ts:2:10 - error TS2305: Module '"prismarine-block"' has no exported member 'Block'.

2 import { Block } from "prismarine-block";
           ~~~~~

src/CollectBlock.ts:186:9 - error TS2578: Unused '@ts-expect-error' directive.

186         // @ts-expect-error
            ~~~~~~~~~~~~~~~~~~~

src/Targets.ts:2:10 - error TS2305: Module '"prismarine-block"' has no exported member 'Block'.

2 import { Block } from 'prismarine-block'
oserikov commented 11 months ago

Same thing on my side. Mac OS 13.2.1 M1Pro

oserikov commented 11 months ago

@Toisoi seems that I've managed to fix this for me by replacing "prismarine-block": "^1.16.3" with "prismarine-block": "=1.16.3" in package.json (Voyager/voyager/env/mineflayer/package.json)

JamesHighsmith commented 11 months ago

@oserikov confirmed, this worked for me as well.

romechenko commented 11 months ago

Thanks for the fix @oserikov, I'm submitting a pr with this change.

xieleo5 commented 11 months ago

Hi, thanks for pointing out this! PR is merged.