bash: npm: command not found?

前端 未结 11 1436
情歌与酒
情歌与酒 2020-12-30 19:33

I\'m learning laravel and follwing this tutorial,

But when I went try and install npm, is says bash: npm: command not found

11条回答
  •  [愿得一人]
    2020-12-30 20:13

    I know it's an old question. But it keeps showing in google first position and all it says it's "install node.js". For a newbie this is not obvious, so all you have to do is go to the node.js website and search for the command for your linux distribution version or any other operating system. Here is the link: https://nodejs.org/en/download/package-manager/

    In this page you have to choose your operating system and you'll find your command. Then you just log into your console as a root (using putty for instance) and execute that command.

    After that, you log as normal user and go again inside your laravel application folder and run again npm install command, and it should work. Hope it helps.

提交回复
热议问题