简体   繁体   English

Npm 没有安装?

[英]Npm not installed?

I recently downloaded node.js from nodejs.org and installed it correctly on windows, from gitbash .我最近从 nodejs.org 下载了node.js并从gitbash正确安装在gitbash上。 I ran node -v , it gave me a version number, but when I ran npm -v , I get bunch of error message like these;我运行node -v ,它给了我一个版本号,但是当我运行npm -v时,我收到一堆这样的错误消息;

Internal/module/cjs/loader.js:330 Throw err;内部/module/cjs/loader.js:330 抛出错误;

Error: cannot find module 'C:\Program Files\nodejs\node_modules\npm\node_modules\nom-registry-fetch\node_modules\fighy-pudding\index.js'.错误:找不到模块“C:\Program Files\nodejs\node_modules\npm\node_modules\nom-registry-fetch\node_modules\fighy-pudding\index.js”。 Please verify that the package.json has a valid "main" entry请确认 package.json 具有有效的“主”条目

And other bunch of errors...和其他一堆错误......

How do I fix these, please请问如何解决这些问题

Npm is distributed with Node.js- which means that when you download Node.js, you automatically get npm installed on your computer. Npm 与 Node.js 一起分发,这意味着当您下载 Node.js 时,您的计算机上会自动安装 npm。 If it's not working in your case then try again or you need to install npm separately.如果它在您的情况下不起作用,请再试一次,或者您需要单独安装 npm。 For installing you can follow the blog:-对于安装,您可以关注博客:-

https://phoenixnap.com/kb/install-node-js-npm-on-windows

OR或者

You can download the same from:-您可以从以下位置下载相同的内容:-

https://nodejs.org/en/download/

I hope it would help!我希望它会有所帮助!

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

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