Skip to content
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

CLI: running -a common@latest throws an error in 1.9.1 #853

Closed
josephjclark opened this issue Jan 6, 2025 · 2 comments · Fixed by #857
Closed

CLI: running -a common@latest throws an error in 1.9.1 #853

josephjclark opened this issue Jan 6, 2025 · 2 comments · Fixed by #857
Assignees
Labels
bug Something isn't working

Comments

@josephjclark
Copy link
Collaborator

Investigate, this should be fine!

@github-project-automation github-project-automation bot moved this to New Issues in v2 Jan 6, 2025
@doc-han
Copy link
Collaborator

doc-han commented Jan 13, 2025

Here @josephjclark
Investigated this a bit because my openfn cli just keeps erroring instead of running workflows for me.

Observation

When common@latest is used, during installation, we resolve the version to find the latest version for installation.
Hence, instead of common@latest, we install [email protected].
But then during the linking stage, we seem to forget this process and then try linking common@latest intead of [email protected] which was installed. This issue might exist for all adaptors (probably)

Possible solutions

After resolving a <pkg>@latest to it's version and installing. We can create a symbolic link in the node_modules directory to map <pkg>@latest to <pkg>@version-number

@doc-han doc-han added the bug Something isn't working label Jan 13, 2025
@josephjclark
Copy link
Collaborator Author

Hey @doc-han - no need to symlink anything. Far too complicated. We normally just annotate the metadata object either with the correct version number, or with an explicit path to the adaptor.

I can't provide much guidance right now but there is precedence in the code, although it's a bit messy. Maybe look to see how @next is handled.

Or just have auto install override the version on the workflow when it resolves @latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants