MineDojo / Voyager

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

npx tsc throw error : npm ERR! cb.apply is not a function #66

Closed yhyu13 closed 1 year ago

yhyu13 commented 1 year ago

Before submitting an issue, make sure you read the FAQ.md

Briefly describe your issue

Install instruction for npx tsc throw error

cd mineflayer-collectblock
npx tsc

throw error :

npm ERR! cb.apply is not a function

Error log

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/bin/node',
1 verbose cli   '/usr/lib/node_modules/npx/node_modules/npm/bin/npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'tsc@latest',
1 verbose cli   '--global',
1 verbose cli   '--prefix',
1 verbose cli   '/home/hangyu5/.npm/_npx/22787',
1 verbose cli   '--loglevel',
1 verbose cli   'error',
1 verbose cli   '--json'
1 verbose cli ]
2 info using npm@5.1.0
3 info using node@v18.16.0
4 verbose npm-session db4d1339cf0e1966
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/tsc 1386ms
8 http fetch GET 200 https://registry.npmjs.org/tsc/-/tsc-2.0.4.tgz 180ms
9 silly pacote tag manifest for tsc@latest fetched in 1589ms
10 verbose stack TypeError: cb.apply is not a function
10 verbose stack     at /usr/lib/node_modules/npx/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
10 verbose stack     at FSReqCallback.oncomplete (node:fs:209:5)
11 verbose cwd /home/hangyu5/Documents/Git-repoMy/AIResearchVault/repo/LLMApp/Voyager/voyager/env/mineflayer/mineflayer-collectblock
12 verbose Linux 5.15.0-73-generic
13 verbose argv "/usr/bin/node" "/usr/lib/node_modules/npx/node_modules/npm/bin/npm-cli.js" "install" "tsc@latest" "--global" "--prefix" "/home/hangyu5/.npm/_npx/22787" "--loglevel" "error" "--json"
14 verbose node v18.16.0
15 verbose npm  v5.1.0
16 error cb.apply is not a function
17 verbose exit [ 1, true ]

...

Please provide your python, nodejs, Minecraft, and Fabric versions here

python 3.10 npx 10.2.2 npm 9.5.1 node v18.16.0 MC (not there yet) Fabric (not there yet) ...

[If applicable] Please provide the Minefalyer and Minecraft logs, you can find the log under logs folder

...

[If applicable] Please provide the GPT conversations that are printed each round.

...

theblazehen commented 1 year ago

Running npm install graceful-fs --save-dev worked for me

yhyu13 commented 1 year ago

@theblazehen exec npm install graceful-fs --save-dev before exec npx tsc works!

yhyu13 commented 1 year ago

Running npm install graceful-fs --save-dev worked for me

@xieleo5 Consider adding this into README? As this might cause problem for installation

theblazehen commented 1 year ago

Might be better to update the package.json if possible?

xieleo5 commented 1 year ago

@theblazehen Hi, thanks for solving this issue! Can you open a PR about updating the package.json? I'm not quite familiar with js's rules for this.

GradientGuru commented 1 year ago

update npm to newest version will solve the problem

ShaoTengLiu commented 1 year ago

The problem still exists. It seems 3rd party library changed exported fields, cannot compile.

Could you please upload the pakcage-lock.json?