一.在Windows的Dos界面下安装Node-red
(1)验证node和npm的版本后
(2)安装node-red
在输入npm install -g --unsafe-perm node-red命令之后,系统报出了以下错误,这里我推测的原因是网络不稳定导致的安装失败.
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to http://registry.cnpmjs.org/node-red failed, reason: getaddrinfo ENOTFOUND registry.cnpmjs.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\DNF\AppData\Local\npm-cache\_logs\2022-10-15T09_51_52_276Z-debug-0.log
(3)解决方法
步骤一:在Dos下输入 npm install -g cnpm --registry=https://registry.npm.taobao.org后回车,出现以下界面即可
步骤二:输入cnpm install -g node-red安装node-red,出现下图提示即可
步骤三:运行node-red
在Dos下输入node-red后回车,出现下图提示
步骤四:复制http://127.0.0.1:1880/到浏览器中,出现下图即为成功.