简体   繁体   English

在Windows10上重新安装NodeJS和NPM时出现问题

[英]Problem re-installing NodeJS and NPM on Windows10

I am a novice with node.js and npm. 我是node.js和npm的新手。 I wanted to use purgecss npm plugin so tried to update and upgrade my node Downloaded v11.1 and installed it but after that Its broken now and I can't figure out its log file either 我想使用purgecss npm插件,因此尝试更新和升级我的节点Downloaded v11.1并安装了它,但此后它现在坏了,我也无法弄清楚它的日志文件 在此处输入图片说明

Here is the npm-debug.log file with it. 这是带有它的npm-debug.log文件。 Please tell me in simple and plain words how to fix this node installation problem 请简单地告诉我如何解决此节点安装问题

在此处输入图片说明

If your having a problem try to update node.js (I did for 3 days). 如果您遇到问题,请尝试更新node.js(我做了3天)。 Try Give NVM (Node Version Manager) a try. 尝试尝试NVM(节点版本管理器)。

Do the following in this order: 按此顺序执行以下操作:

  1. curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash 庆典

  2. command -v nvm 命令-v nvm

  3. nvm install node nvm安装节点

  4. node -v 节点-v

node -v will show you that your node.js is updated. node -v将向您显示node.js已更新。

So the problem was that the Environment Paths somehow got messed up on the re-install of Node latest version. 因此,问题在于重新安装Node最新版本时,环境路径被弄乱了。 So these are the Environment Variables paths settings that worked for me Now my settings that worked for me looks like this 所以这些是对我有用的环境变量路径设置现在对我有用的设置看起来像这样

USER VARIABLES 用户变量 在此处输入图片说明

SYSTEM VARIABLES 系统变量 在此处输入图片说明

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

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