dalai icon indicating copy to clipboard operation
dalai copied to clipboard

npm ERR! cb.apply is not a function

Open A11en0 opened this issue 1 year ago • 9 comments

OS: ubuntu-16.04 Nodejs: 19

image

A11en0 avatar Mar 21 '23 03:03 A11en0

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 avatar Mar 21 '23 04:03 zsinba

image

Azure 8C32G; US3 Area. 65B

cool.

zsinba avatar Mar 21 '23 10:03 zsinba

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. :)

1larity avatar Mar 22 '23 11:03 1larity

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.

zsinba avatar Mar 22 '23 11:03 zsinba

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.

1larity avatar Mar 22 '23 12:03 1larity

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

zsinba avatar Mar 22 '23 12:03 zsinba

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

1larity avatar Mar 25 '23 11:03 1larity

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

Davidy22 avatar Mar 31 '23 08:03 Davidy22

I'll give that a go, thanks!

1larity avatar Apr 01 '23 17:04 1larity