You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At froum a user reposrted that he cannot install / upgrade backitup. The reason was a broken io-package.json. He got the following messeg every time he wanted to install the adapter::
host.vm-iobroker02 install adapter backitup
host.vm-iobroker02 error: reading io-package.json /opt/iobroker/node_modules/iobroker.backitup/io-package.json: Unexpected end of JSON input
thorsten@vm-iobroker02:/opt/iobroker$
The problem is that during an installation request iob tries to detect the currently installed version. As reading i-package.json fails (dur to corrupt file) the installation process aborts. It looks lie even a deinstallation does not really work (but I did not verify this).
I would suggest to adapt th sinstallation code in such a way that every time io-package.json (and eventually other critical files) cannot be read the install command should behave just like it does when performing a reinstallation. (npm deinstall followed be npm install). This would fix such cases and is the expected behavior for a user trying to (re-)install anyway.
Note: As the reinstallation code already dies a removal of the npm / code parts followed by a reinstalltion this fixing would save the current paramater settings and thus have benfits above a iob remove followed by a manual deletion of the node_modules tree too
Why?
User would expect thet the system will try to fix fixable erros when perforing a ne installation / reinstallation attempt
How?
see above
The text was updated successfully, but these errors were encountered:
Yes this will work of course. But thats NOT a solution for a standard user.
I will not guide a user to use npm directly as this would cause additional problems if used at wrong place while I will for sure try to help in such cases by suggesting to issue an iobroker install xxx command.
As the complete code for (npm) removal and install does already exist at js-controller (see reinstall path) the only extension which should be required is to ignore / catch a parsing error at io-package.json and i.e. assume we have installed 0.0.0 or something like this to let the improvement work. Thats at least my guess without reading the corresponding code.
No existing issues.
Description
At froum a user reposrted that he cannot install / upgrade backitup. The reason was a broken io-package.json. He got the following messeg every time he wanted to install the adapter::
Related forum topic: https://forum.iobroker.net/topic/79683/backup-l%C3%A4sst-sich-nicht-installieren
The problem is that during an installation request iob tries to detect the currently installed version. As reading i-package.json fails (dur to corrupt file) the installation process aborts. It looks lie even a deinstallation does not really work (but I did not verify this).
I would suggest to adapt th sinstallation code in such a way that every time io-package.json (and eventually other critical files) cannot be read the install command should behave just like it does when performing a reinstallation. (npm deinstall followed be npm install). This would fix such cases and is the expected behavior for a user trying to (re-)install anyway.
Note: As the reinstallation code already dies a removal of the npm / code parts followed by a reinstalltion this fixing would save the current paramater settings and thus have benfits above a iob remove followed by a manual deletion of the node_modules tree too
Why?
User would expect thet the system will try to fix fixable erros when perforing a ne installation / reinstallation attempt
How?
see above
The text was updated successfully, but these errors were encountered: