在 Manjaro linux 上安装 Node js 和 npm 时出现问题

Ива*_*ван 6 linux node.js npm manjaro

操作系统:Manjaro
我通过以下命令安装了npmnodejssudo pacman -S nodejs npm
: 安装后出现错误:

~]$ 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

Run Code Online (Sandbox Code Playgroud)

我怎么解决这个问题?

小智 9

    \n
  1. 安装nvm节点版本管理器

    \n
     yay -S nvm\n
    Run Code Online (Sandbox Code Playgroud)\n
  2. \n
  3. 加载nvm

    \n
     source /usr/share/nvm/init-nvm.sh\n
    Run Code Online (Sandbox Code Playgroud)\n
  4. \n
  5. 您还可以在环境文件中添加上述行,例如.bashrc您就不必每次都执行此操作。

    \n
  6. \n
  7. 安装Node.jsnpm

    \n
     nvm -g install npm\n
    Run Code Online (Sandbox Code Playgroud)\n
  8. \n
  9. 测试您的设置 \xe2\x80\x93 打开一个新终端并使用安装包测试您的设置 \xe2\x80\x93 打开一个新终端并使用npm

    \n
     $ nvm use stable\n $ nvm -g install browser-sync\n $ browser-sync start --server\n
    Run Code Online (Sandbox Code Playgroud)\n
  10. \n
\n