Error: npm is known not to run on Node.js V4.2.6

前端 未结 8 1780
名媛妹妹
名媛妹妹 2020-12-30 20:01

how can I solve the following error? I use Ubuntu 16. When I run any npm command such as \"npm run dev\" I get this error:

ERROR: npm is known not to

8条回答
  •  情书的邮戳
    2020-12-30 20:11

    First, Uninstall completely nodejs and npm.

    sudo apt remove nodejs npm
    

    Then, reinstall it over the link below:

    curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    sudo apt-get install -y nodejs
    

    Refer: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

提交回复
热议问题