简体   繁体   English

如何在 Windows 10 上安装 nodemon?

[英]How can I install nodemon on windows 10?

I am using the bash console in windows 10. I am using node.js and I want to install nodemon, but I get this:我在 Windows 10 中使用 bash 控制台。我正在使用 node.js 并且我想安装 nodemon,但我得到了这个:

sudo: npm: command not found

and I'm supposed to have npm我应该有 npm

Providing information about how you installed npm could be useful.提供有关您如何安装 npm 的信息可能会有用。 Assuming you used windows and not bash to install npm, that is probably why you might be having an issue.假设您使用 Windows 而不是 bash 来安装 npm,这可能就是您遇到问题的原因。

Try installing node through bash console.尝试通过 bash 控制台安装节点。

Install git first先安装git

apt-get install git

Get the latest version of node获取最新版本的节点

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

Install node安装节点

sudo apt-get install -y nodejs

if it still doesn't work SOMETIMES node will get installed as nodeJS so you might have to create a hard link如果它仍然不起作用SOMETIMES节点将作为 nodeJS 安装,因此您可能必须创建一个硬链接

ln -s `which nodejs` /usr/bin/node

I am using the bash console in windows 10. I am using node.js and I want to install nodemon, but I get this:我在 windows 10 中使用 bash 控制台。我正在使用 node.js 并且我想安装 nodemon,但我得到了这个:

sudo: npm: command not found

and I'm supposed to have npm我应该有 npm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM