-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node-RED addon package installer appears to not handle updates to Git URL dependencies #1679
Comments
Briefly looking at the npm documentation, You can find the code for npm install at addon-node-red/node-red/rootfs/etc/s6-overlay/s6-rc.d/init-customizations/run Lines 22 to 35 in 48ed99d
|
Actually I think it should be installing a specific version using semantic versioning. To install a package version based on a specific tag or tag range, you can specify a semver expression as follows:
Which will make npm look for any tags matching that range in the remote repository, as it would for a package published on the npm registry. For example:
|
Oh goodness, did I really get the # wrong? I will experiment more. I had earlier tried the semver syntax with a # and using the exact syntax you wrote, and thought it hadn't been working at all, which is why I started tagging. Stay tuned |
I think this might be an SSH auth problem. Although I entered an https URL, the code is transcoding the URL and using ssh to fetch the repo? I have a private key and the pubkey is up on my own github account, but to no avail.
Also it confuses me that Advanced SSH & Web Terminal shows more entries in the .ssh folder than my Studio Code Server. I think this has something to do with protection mode. But maybe that's related to this problem, as I switch between the two often. |
Try prefixing it as per the docs? Addons are containers, you won't see the same behaviour between them. |
Containers, well no bloody wonder. This onion that is home automation is getting more layers to it all the time. I think I am getting somewhere with your suggestion, @sinclairpaul |
So far, I find that But
So no solution still for updating to latest. |
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. |
It's potentially still an issue for me, but I've gone off on too many tangents, starting a dive into node-red node development, that resulted in several other tangents, including bun. By the time I come up for air I can raise this again if need be. Thus I would close it. |
To close out this issue with things I've discovered (for future readers):
† Beware all uses of the word "just". |
Problem/Motivation
Difficulty installing and updating to specific or latest versions of a package, using Git URLs
Expected behavior
Adding a gitURL that specifies a tag or version should cause the package to be updated to that version. Or there should be a way for users to direct the add-on to get the latest version of a package.
Actual behavior
Package remains at a previous install level.
package.lock.json
continues to refer to the older release.Steps to reproduce
After already having a older version of the below example package installed, for example by adding the following to your add-on config:
Update the reference to a later version of the package:
Proposed changes
The package should update to the specified version.
Even without
#0.8.1
appended, the installer should get the latest version,or we should have a way to specify that we need the latest version installed, rather than having to specify tags.
Baring the ability to have the add-on manage the full life-cycle of packages, we should have direct access to run
yarn
to install, update, uninstall and manage this life-cycle on our own. On my ODroid N+ with Home Assistant pre-installed, I can't find yarn installed anywhere, but yet it must be there? So must be npm and node. I have a fear that if I install these again, I will break something.
Also: On an independently installed instance of Node-RED (e.g. on my Mac, not tied to Home Assistant), I am able to manage the life cycle of my package dependencies using
npm
. In other words, this limitation is unique to the Home Assistant add-on where we must go thru the config in order to add packages.The text was updated successfully, but these errors were encountered: