CLI (runtime?): report better errors when adaptors aren't installed
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 23
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 17
Description
A common problem is to try and run a job - particularly a workflow - when adaptors aren't installed to the repo.
Right now the error you get isn't very good or very useful. We can do better.
throw new Error(`Failed to load module “${specifier}“`);
^
Error: Failed to load module “@openfn/language-postgresql”
This raises the idea of prevalidating adaptors in the CLI before running the job - which I abandoned because it was getting a bit too complex.
But maybe if -i isn't provided and the repo doesn't provide a matching version, we can raise an error
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CLI path that runs a job or workflow and follows adaptor module loading, especially when -i is absent. Reproduce the missing @openfn/language-postgresql error, then determine the expected message for a repo without a matching adaptor version; done means the CLI reports a useful, actionable error before or instead of the current module-load failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100