zsh: command not found: live-serverSOLUTION:$ export PATH=$PATH:/home/user/.yarn/bin/
Today my attempt to install the live-server package in a Linux Mint Sylvia (Ubuntu Xenial) box using yarn failed. The installation went just fine, with just some info messages:
$ yarn global add live-server
yarn global v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
warning Pattern ["object-assign@latest"] is trying to unpack in the same destination "/home/dbkreling/.cache/yarn/v1/npm-object-assign-4.1.1-2109adc7965887cfc05cbbd442cac8bfbb360863" as pattern ["object-assign@^4.1.0","object-assign@^4"]. This could result in a non deterministic behavior, skipping.
info email@example.com: The platform "linux" is incompatible with this module.
info "firstname.lastname@example.org" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "email@example.com" with binaries:
Done in 1.98s
Cool! And then..
zsh: command not found: live-server
Digging it further I found it (no pun intended) hidden in my home directory:
Commands from vim buffers can take long to get into our brains. Practice will lead to perfection… eventually.
Here are some tips to get them into memory faster:
:e filename - Edit a file an existing file in a new buffer
:sp filename - Open a file in a new buffer and split window
:vs or :vsp Open a file in a new buffer and split window vertically
ctrl+ws - Split window to work in two places of the same file
ctrl+wv - Split window vertically (and work in the same file)
:bnext (or :bn) - go to next buffer
:bprev (of :bp) - go to previous buffer
:bd - delete a buffer (close a file)
ctrl+ww - switch between windows
ctrl+wq - Quit a window
With pictures to decorate this post:
Open up a new file called ‘example1’
With ‘example1’ open, type in ‘:vs example2’ to vertically split the window and edit a new file ‘example2‘. It will open up a new buffer to the left of ‘example1’
From the ‘example2’ buffer, type in ‘:sp example3’ to horizontally split the screen and edit a new file ‘example3‘. It will open a new buffer above ‘example2’
All three buffers displayed. Use CTRL-W+W to cycle through them.
This is a quick checklist on how to create a user from the command line:
1. useradd -m new_username (add a user called new_username with a home directory)
2. passwd new_username (set a password for new_username)
3. (optional) usermod -aG wheel new_username (to include the user in the sudoers list)
4. su - new_username (to change to the new_username account) NOTE: sudo usermod -a -G sudo username (to include user ‘username’ in the sudo group)
5. usermod -s /bin/bash NEW_USERNAME(to set the shell as bash. Change for other shells)
If you need to grant access to you system just for specific applications, you can tweak the visudo file. Using an admin user, issue:
$ sudo visudo
group the commands into aliases (line 18). List all commands you want to grant, separate by comma
grant access to them (line 22). The ‘NOPASSWD’ will restrain to ask for a password for the minicom command. All the other commands ran with sudo will prompt for a password and will fail. To require password, do not include the ‘NOPASSWD’ tag.