解决node-red-contrib-home-assistant-websocket节点安装出错问题
用docker方式安装的node-red,一直装不了node-red-contrib-home-assistant-websocket 0.46.2,提示如下错误:2022-11-11T12:47:21.281Z 安装 : node-red-contrib-home-assistant-websocket 0.46.2
2022-11-11T12:47:21.489Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
2022-11-11T12:47:32.085Z npm
2022-11-11T12:47:32.086Z notice created a lockfile as package-lock.json. You should commit this file.
2022-11-11T12:47:32.091Z npm
2022-11-11T12:47:32.091Z WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
2022-11-11T12:47:32.091Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2022-11-11T12:47:32.091Z
2022-11-11T12:47:32.093Z + [email protected]
2022-11-11T12:47:32.093Z added 236 packages from 336 contributors in 10.245s
2022-11-11T12:47:32.106Z rc=0
看意思是fsevents这个依赖装不上,然而linux并不需要这个依赖,据说是npm 8的一个bug。。。
试了N遍终于找到解决办法,记录如下:
#进入docker容器
docker exec -it nodered /bin/bash
#设置腾讯源(这步很关键,貌似阿里源就不行)
npm config set registry http://mirrors.cloud.tencent.com/npm/
#强制安装fsevents
npm i -f [email protected]
#手动安装[email protected]
npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
#修复一下
npm audit fix -f
#退出容器
exit
#重启容器,搞掂!
docker restart nodered
如图:
沙发 docker默认源安装nr和websocket,升级0.46.2没遇到任何幺蛾子:lol 按照你的操作,还是升级不了
npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
npm ERR! code ENOTSUP
npm ERR! notsup Unsupported engine for [email protected]: wanted: {"node":">=14.0.0"} (current: {"node":"10.24.1","npm":"6.14.12"})
npm ERR! notsup Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Required: {"node":">=14.0.0"}
npm ERR! notsup Actual: {"npm":"6.14.12","node":"10.24.1"}
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-11-11T20_37_17_510Z-debug.log
xuyang 发表于 2022-11-12 04:37
按照你的操作,还是升级不了
npm install --no-audit --no-update-notifier --no-fund --save --save-pref ...
你npm版本不对,我是8,你是6,6不需要我这样操作,直接npm install那句就行 楼主请教个问题,我用docker安装的nodered有时候抽风,出现大量的连接hass,然后断开hass的日志,导致cpu 的load能飙到40多去,系统一下就卡死了。
重启nodered就正常了。
现在只能再hass里面做个策略。load升到4的时候马上重启nodered,但是感觉没找到根本原因,很憋火 trz0332 发表于 2022-11-15 11:25
楼主请教个问题,我用docker安装的nodered有时候抽风,出现大量的连接hass,然后断开hass的日志,导致cpu...
这个还真没遇到过,可以看看node-red的日志?或npm的日志?这个俺是真不太懂,楼下大神上! 同样是docker部署的环境,HA里装了nodered插件,但打开的流一直提示Attention: This node requires Node-RED custom integration version 1.1.0+to be installed in Home Assistant for it to function.
应该如何解决呢?插件版本已尝试重新安装最新的1.1.2版本,然后重启HA和noedred的容器~~还是报上面的错误 cnbb 发表于 2022-11-16 14:53
同样是docker部署的环境,HA里装了nodered插件,但打开的流一直提示Attention: This node requires Node-RE ...
我也是同一样的问题,请问解决没 yc0209 发表于 2022-11-20 06:42
我也是同一样的问题,请问解决没
已解决了
页:
[1]
2