windkh / node-red-contrib-telegrambot

Telegram bot nodes for node-red.
Other
265 stars 118 forks source link

unable to update / install #235

Closed dibadodo closed 2 years ago

dibadodo commented 2 years ago

I was running th telegram bot for a lot of time. Today i trying to install the update. The install remove the existing version but is unable install the new version. Install log: 2022-02-11T22:25:15.246Z installieren : node-red-contrib-telegrambot 11.2.3

2022-02-11T22:25:15.273Z npm install --no-package-lock --global-style --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-contrib-telegrambot@11.2.3 2022-02-11T22:25:24.479Z [out] 2022-02-11T22:25:24.479Z [out] up to date in 8s 2022-02-11T22:25:24.575Z rc=0

I running node-red as redmatic inside a RaspberryMatic on Raspi3

Would be nice when i can get the old version to get it working again if the new version not running on my environment.

Greetings

jbrown123 commented 2 years ago

@colinl FYI: I'm upgrading NR to the latest version right now.

colinl commented 2 years ago

Perhaps it was still confused because of the previous messing about.

jbrown123 commented 2 years ago

@colinl ... previous message about ... what?

That it failed previously with 11.2.3?

colinl commented 2 years ago

Yes. The node was installed but not usable. It may have been a hangover from that.

colinl commented 2 years ago

@dibadodo I see you are running node red as root. Is that normal on redmatic?

│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /root/.config │

That suggests that the user who ran that command did not have full permissions to all the files there, which is odd, since presumably you are logged in as root doing this.

jbrown123 commented 2 years ago

Yes. The node was installed but not usable. It may have been a hangover from that.

I received the same error each time I installed, starting with 11.2.3. I don't think that was the issue.

dibadodo commented 2 years ago

@colinl the system seems to be working as expected the behavior of clie output has changed since install of 11.4.2 I thin the Frame with hint npm update check failed was not seen before. The output of npm list was before like this: ── node-red-contrib-arp@0.0.2 ├── node-red-contrib-bigtimer@2.7.5 ├── node-red-contrib-castv2@4.1.2 ├── node-red-contrib-config@1.2.1 ├── node-red-contrib-debounce@0.0.2 ├── node-red-contrib-fs-ops@1.6.0 ├── node-red-contrib-functionx@1.0.2 ├── node-red-contrib-light-scheduler@0.0.17 ├── node-red-contrib-npm@1.0.2

than output was this:

+-- node-red-contrib-combine@1.8.1 +-- UNMET DEPENDENCY node-red-contrib-deconz@2.3.3 | +-- UNMET DEPENDENCY @node-red/util@2.1.1 | | +-- UNMET DEPENDENCY fs-extra@10.0.0 | | | +-- UNMET DEPENDENCY graceful-fs@4.2.8 | | | +-- UNMET DEPENDENCY jsonfile@6.1.0 | | | | +-- UNMET DEPENDENCY graceful-fs@4.2.8 | | | | -- UNMET DEPENDENCY universalify@2.0.0 | | | -- UNMET DEPENDENCY universalify@2.0.0 | | +-- UNMET DEPENDENCY i18next@21.3.1 | | | -- UNMET DEPENDENCY @babel/runtime@7.15.4 | | | -- UNMET DEPENDENCY regenerator-runtime@0.13.9 | | +-- UNMET DEPENDENCY json-stringify-safe@5.0.1 | | +-- UNMET DEPENDENCY jsonata@1.8.5

after some new install, npm found and so on it shows now again like this:

root@homematic-raspi:~# source /usr/local/addons/redmatic/home/.profile root@homematic-raspi:~# cd /usr/local/addons/redmatic/var root@homematic-raspi:/usr/local/addons/redmatic/var# npm list node-red-project@0.0.1 /usr/local/addons/redmatic/var +-- node-red-contrib-ccu@3.4.2 +-- node-red-contrib-combine@1.8.1 +-- node-red-contrib-deconz@2.3.3 +-- node-red-contrib-hikvision-ultimate@1.0.60 +-- node-red-contrib-influxdb@0.6.1 +-- node-red-contrib-telegrambot@10.4.1 +-- node-red-contrib-unit-converter@0.0.2 +-- node-red-dashboard@3.1.5 +-- node-red-node-email@1.14.0 +-- node-red-node-rbe@0.5.0 `-- node-red-node-tail@0.3.2

but still with old version of 10.4.1

i don't know if it normal to run with root - I think so... - I have to ask in other project

windkh commented 2 years ago

As this is very spooky I have another theory. Between version 10.x and 11.x I changed a dependency for socks5 support. However the package.lock was not updated. maybe that messed things up since then?

TotallyInformation commented 2 years ago

If in doubt, delete the lock file. I do that regularly as I've had so many issues with it in the past. It should have no impact on Node-RED installations.

colinl commented 2 years ago

Should you even have a lock file in a contrib node? If you need specific versions of dependencies then put it in the dependencies in package.json

TotallyInformation commented 2 years ago

npm manages that itself Colin. You don't get a lot of choice. It doesn't get published to npm I don't believe though. But I think that npm may create one when you install. Never been too sure to be honest. If anything funny happens, the lock file is the first thing I delete.

colinl commented 2 years ago

Well my nodes don't have a lock file in the node's github repo (eg https://github.com/colinl/node-red-contrib-pid). But you are right in that it doesn't get published to npm anyway (or at least it doesn't get installed), I checked with the telegrambot node and it is not in the installed files. Perhaps it influences which versions of the dependencies get loaded though, I don't know.

dibadodo commented 2 years ago

@windkh Maybe, normaly i don't look on the cli - when the upgrade work as expected and all other is working to - normal i start updates only on gui