MineDojo/Voyager

error when using npx-tsc in mineflayer-collectblock folder

Toisoi opened this issue ยท 5 comments

Toisoi commented

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'

Same thing on my side. Mac OS 13.2.1 M1Pro

@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)

@oserikov confirmed, this worked for me as well.

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

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