cocktailpeanut / dalai

The simplest way to run LLaMA on your local machine
https://cocktailpeanut.github.io/dalai
13.09k stars 1.42k forks source link

npm ERR! cb.apply is not a function #172

Open A11en0 opened 1 year ago

A11en0 commented 1 year ago

OS: ubuntu-16.04 Nodejs: 19

image

zsinba commented 1 year ago

I think you need to update your nodejs env. and install depends.

or change to ubuntu 22.04. it's ok for 22.04

zsinba commented 1 year ago

image

Azure 8C32G; US3 Area. 65B

cool.

1larity commented 1 year ago

I'm in a similar position, on Ubuntu 22.04. I had everything working okay last night, but when I started a new terminal session today I started getting this error. I suspect we need to initialise some kind of virtual environment, but my expertise is in bare metal C++, npm and web tech generally is a mystery to me. :)

zsinba commented 1 year ago

I'm in a similar position, on Ubuntu 22.04. I had everything working okay last night, but when I started a new terminal session today I started getting this error. I suspect we need to initialise some kind of virtual environment, but my expertise is in bare metal C++, npm and web tech generally is a mystery to me. :)

I Could give a hand.

1larity commented 1 year ago

Sorry if this is basic stuff, gotta start learning NPM somewhere! I installed NPM (nodejs?) using the NodeSource instructions here:-https://github.com/nodesource/distributions, specifically _curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - &&\ sudo apt-get install -y nodejs_. I noticed at some point the curl script setup and activated an environment, which I think was enough for me to run dalai in the same session once installed, following the instructions in the readme.md for this project. But once in a new terminal session, dalai no longer has it's references set up correctly. Unfortunately it's kind of hard to track what the curl script did, especially once in a new terminal session. The readme.md for dalai assumes some degree of knowledge about nodejs/npm and a working dev environment. I think it could be improved by adding some information about the project prerequisites, for developers coming from other backgrounds.

zsinba commented 1 year ago

I think the Readme file is quite detailed and provides instructions under the three OS environments. and you are under Ubuntu Tu. If it is a temporary machine, it is recommended that you use the Root account directly.

sudo apt-get purge nodejs && curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - && sudo apt-get install -y nodejs build-essential
1larity commented 1 year ago

I think the Readme file is quite detailed and provides instructions under the three OS environments. and you are under Ubuntu Tu. If it is a temporary machine, it is recommended that you use the Root account directly.

sudo apt-get purge nodejs && curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - && sudo apt-get install -y nodejs build-essential

You misunderstand, No problem with those install instructions. The instructions for Dalai, clearly go way beyond 2 lines though :)

Davidy22 commented 1 year ago

I was having these issues myself, and from scouring the internet every person who I could find that resolved this issue had reinstalled node/npm. Seems like this issue primarily arises from a version mismatch between node and npm

1larity commented 1 year ago

I'll give that a go, thanks!