banner
venom

venom

Install Vue.js on Ubuntu (using yarn)

Operating System: Ubuntu 18.04.6 LTS

Kernel: Linux 4.15.0-169-generic

Architecture: x86-64

Install the latest version of Vue.

root@ubuntu:~# yarn global add @vue/cli

Verify.

root@ubuntu:~# vue -V
@vue/cli 5.0.8

Create a directory to place your project and navigate into it.

root@ubuntu:~# mkdir myVue

Create a Vue project.

root@ubuntu:~# vue create my-vue

Start the project.

root@ubuntu:~# yarn serve

Error on first startup: Error: ENOSPC: System limit for number of file watchers reached, watch '/opt/myVue/my-vue/public'

Reason: The system limit for file watchers has been reached, and it needs to be increased from the default limit.

Check the limit:

cat /proc/sys/fs/inotify/max_user_watch

Temporarily increase the limit:

root@ubuntu:~# sysctl fs.inotify.max_user_watches=524288
root@ubuntu:~# sysctl -p

Permanently increase the limit:

root@ubuntu:~# echo fs.inotify.max_user_watches = 524288 | sudo tee -a /etc/sysctl.conf
root@ubuntu:~# sysctl -p
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.