Got error when do bench update

Hello,

I got below problem when do bench update, how to resolve it?

Thanks,
Sopheak

Try this…

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
cd ~/frappe-bench;
bench start

Seems like a nifty solution @trentmu. Would you mind explaining what it does?

Listen uses inotify to monitor directories for changes. If the limit is not enough to monitor all files inside a directory, then it must be increased for Listen to work properly. This line just increases it from the default (which is about 8192 I think). Maybe the 512k is excessive, but it seems to be the popular selected value.
It does cause an increase in required RAM/usage though, so I am not a huge fan of it, but it does work often, so hard to argue

2 Likes

Hi @trentmu, I tried with solution provided, but issue has not been resolved.

I see you also have an error at the top there, related to npm. Have you checked/confirmed that node/npm are correctly installed version?

node -v && npm -v

I got this when i ran the code.

It seems like npm is not set up correctly. This should work…

curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
apt install yarn -y
apt install nodejs -y
#1- Test the install:
node -v && npm -v

I got this error when I ran the first code

I don’t know if it is specific to ubuntu (since I use debian), but I think you can delete or rename that file, and then try the node/npm install again

sudo rm -f /etc/apt/sources.list.d/yarn.list
curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
apt install yarn -y
apt install nodejs -y
#1- Test the install:
node -v && npm -v

1 Like

Hi @trentmu, thanks for your help. After followed your solutions to update NodeJS to version 8 and update Yarn and did a Bench Update, everything work perfect now.