5

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?

Иван
  • 158
  • 2
  • 12

4 Answers4

8
  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
    
Fudge
  • 49
  • 4
  • 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. ``` – Иван Oct 04 '20 at 14:31
  • use sudo while using npm commands. and also there's a mistake..please use npm instead of nvm – Gulshan Yadav Oct 10 '20 at 16:49
  • @GulshanYadav. In 4th point, nvm install npm too? – Smart Manoj Jan 24 '21 at 09:17
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

OtienoSamwel
  • 316
  • 2
  • 12
1

Installing:

pamac install nodejs

pacman -S nodejs

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

ZEN
  • 11
  • 1
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
Folaht
  • 1,053
  • 1
  • 13
  • 32