dalai
dalai copied to clipboard
Error: Cannot find module 'node-pty'
Running npx dalai llama just spits this error at me.
node:internal/modules/cjs/loader:1078
throw err;
^
Error: Cannot find module 'node-pty'
Require stack:
- C:\Llama\dalai\index.js
- C:\Llama\dalai\bin\cli.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Module._load (node:internal/modules/cjs/loader:920:27)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.<anonymous> (C:\Llama\dalai\index.js:2:13)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'C:\\Llama\\dalai\\index.js', 'C:\\Llama\\dalai\\bin\\cli.js' ]
}
Node.js v18.14.2```
Run into the same issue, just do
npm install node-pty
@KevinXuxuxu Tried it on Google Colab, Got the same response after installing node-pty
any suggestions?
npm install node-pty
helped get past the first hurdle but quickly hit problems because 'make' was not installed. Tried installing make for windows but It's just throwing more and more errors.
You need to install make.
Lookup e.g "How to install make on macos" (or windows, or linux, etc)
@KevinXuxuxu Tried it on Google Colab, Got the same response after installing
node-pty
any suggestions?
@amrrs I had the same error in colab, after a bit of searching these commands helped me to solve it:
!curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
!apt install -y nodejs nodejs
!npm install node-pty
!apt install python3.9-venv
Thanks so much @JavSensei That's quite helpful. I tried installing different node js version but I didn't do this cleanly. Thanks a lot!
@JavSensei Strangely, I got ```/bin/bash: curl -fsSL https://deb.nodesource.com/setup_16.x : No such file or directory
I had to use sudo and apt-get I went past this issue now. @JavSensei Did you manage to run this on Colab? For me it's just crashing while installing dalai
@amrrs Not yet, downloading the model produces a OOM because of the way the output is displayed in colab, so the process stops, I managed to avoid this by downloading the model directly with llama-dl, so when I run npx dalai llama 7B again, it skips the download process and everything goes well until it's time to convert the model to ggml, again the RAM is completely filled and I can not continue.
Yesterday I found that someone had uploaded the converted model to mega, so I could download it and use it without all the above process, I didn't have time so I was going to try it today, but unfortunately it seems that mega deleted the folder with the models, so for now I have no way to make it work in colab, I would like to know how someone managed to make it work in Termux
resolved for me using below(Amazon Linux machine) :
-
sudo yum groupinstall 'Development Tools'
-
make -v
-
npm install node-pty