简体   繁体   English

无法在MacBook Pro中安装npm

[英]cannot install npm in MacBook Pro

My laptop cannot run the command 'npm' now. 我的笔记本电脑现在无法运行命令“ npm”。

I work in a group for my coursework using Node.js plus Express. 我在小组中使用Node.js plus Express工作。 first time, I installed the node.js and express in my laptop. 第一次,我安装了node.js并在笔记本电脑中进行表达。 One of group member put application package on the Git and I just need to connect with the Git and not necessary to install Node and Express individually. 小组成员之一将应用程序包放在Git上,我只需要与Git连接,而不必单独安装Node和Express。 So I tried to connect with Git with commands; 因此,我尝试通过命令与Git连接。 $git pull, and install package with $ npm install, it works well. $ git pull,并使用$ npm install安装软件包,它运行良好。

Then, I deleted Node.js and Express files in my local driver in the laptop, and connect with Git using the same codes above, whilst $npm doesn't work as well. 然后,我在笔记本电脑的本地驱动程序中删除了Node.js和Express文件,并使用与上面相同的代码连接到Git,而$ npm也不起作用。 The error always is 'command not find'. 错误始终是“找不到命令”。 help!!!! 救命!!!!

Git and NPM are unrelated however you may be using them both for your project. Git和NPM无关,但是您可能会在项目中同时使用它们。 Git is a version control system and NPM is a Package Manager for Node.js Git是一个版本控制系统,而NPM是Node.js的软件包管理器

Reinstall Node.js (NPM comes with it too by default) from http://nodejs.org/ http://nodejs.org/重新安装Node.js(默认情况下也附带NPM)。

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

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