Problem installing node js and npm on Manjaro linux
Asked Answered
E

4

6

OS: Manjaro
I installed npm and nodejs by this command: sudo pacman -S nodejs npm
after installation i have an error:

~]$ npm -v
node: error while loading shared libraries: libicui18n.so.67: cannot open shared object file: No such file or directory
~]$ node --version
node: error while loading shared libraries: libicui18n.so.67: cannot open shared object file: No such file or directory

How can i solve this problem?

Encyclopedia answered 4/10, 2020 at 13:0 Comment(0)
E
9
  1. Install nvm (Node Version Manager)

     yay -S nvm
    
  2. Load nvm

     source /usr/share/nvm/init-nvm.sh
    
  3. You can also add the above line in your environment file such as .bashrc so you won’t have to do it every time.

  4. Install Node.js and npm

     nvm -g install npm
    
  5. Test your setup – open a new terminal and install a package using npm

     $ nvm use stable
     $ nvm -g install browser-sync
     $ browser-sync start --server
    
Erle answered 4/10, 2020 at 13:44 Comment(3)
on the 3rd point, he gives me the fact that I did not specify the command / flag correctly. using the command suggested reverts me to the original problem.nvm install-latest-npm Attempting to upgrade to the latest working version of npm... node: error while loading shared libraries: libicui18n.so.67: cannot open shared object file: No such file or directory Unable to obtain node version. Esme
use sudo while using npm commands. and also there's a mistake..please use npm instead of nvmErle
@GulshanYadav. In 4th point, nvm install npm too?Anthropologist
C
2

I found that you need to install both nodejs and npm from the package manager. If you first install npm however, node is automatically installed as a dependency.

yay -S npm

Cresa answered 5/1, 2022 at 10:33 Comment(0)
F
1

Installing:

pamac install nodejs

pacman -S nodejs

refer : https://discover.manjaro.org/packages/nodejs

Frigate answered 1/3, 2021 at 6:21 Comment(0)
C
0

Modified from Gulshan Yadav's answer.

  1. Install nvm (Node Version Manager)
sudo pacman -S nvm 
  1. Load nvm & add executable to bashrc
source /usr/share/nvm/init-nvm.sh
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' | tee -a ~/.bashrc
  1. Install Node.js and npm
nvm install stable
  1. Test your setup
npm install -g nativefier
nativefier --name Deepl "https://deepl.com"
cd Deepl-linux-x64
./Deepl
Canary answered 24/3, 2023 at 7:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.