bash:npm:在 Debian 9.3 中找不到命令 [英] bash: npm: command not found in Debian 9.3

查看:85
本文介绍了bash:npm:在 Debian 9.3 中找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Debian 9.3.(伸展)我无法运行npm"命令.

I am using Debian 9.3. (stretch) I cannot run "npm" commands.

node -v

bash: node: command not found

nodejs -v

v4.8.2

npm -v

bash: npm: command not found

我是 Debian 的新手,我不明白发生了什么.
- 我已经重新安装了 Node.js
- 我已经尝试按照 官方页面.
- 我已经运行了 apt-get install npm 输出 E: Unable to locate package npm.
- 我在 Debian 测试时遇到了同样的错误.

I'm a newbie on Debian and I can't understand what's happening.
- I already reinstall Node.js
- I already tried following the steps of the Official Page.
- I already ran apt-get install npm Output E: Unable to locate package npm.
- I was at Debian Testing and have the same error when I was there.

感谢阅读和帮助
- 融化

Thanks for read and help
- Melt

推荐答案

你是从他们的网站安装 node js 的吗?如果不是这种情况,请删除它 apt-get remove nodejs并从此链接安装它(按照此步骤)https://nodejs.org/en/下载/package-manager/#debian-and-ubuntu-based-linux-distributions

Did you installed node js from their website? if that's not the case remove it apt-get remove nodejs and install it from this link (follow this steps) https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

看到您的版本后,我意识到您正在运行旧版本的 nodejs...请删除当前的 nodejs 版本(V4.8.2)并通过此链接安装它 https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions它将为您提供安装了 NPM 的最新版本(我的是 V9.2.0).

After seing your version i realized that you are running an older version of nodejs... please remove the current nodejs version (V4.8.2) and install it via this link https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions It will give you the last version (mine is V9.2.0) with NPM installed aswell.

这篇关于bash:npm:在 Debian 9.3 中找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆