Skip to content

← All questions

Dataset uses type "db" but @sdods/db is not available — is the package optional or not?

Example threads. These questions and answers were written by the SDODS team to document real problems and how to fix them. The people named are illustrative, not real users. Questions asked on this site are marked new.

We keep the test workspace deliberately thin — the runner and nothing else — because it is installed on machines that only ever execute suites. One scenario reads reference rows from a table and it dies at run time:

text
✖ DB_REQUIRED: Dataset uses type "db" but @sdods/db is not available.
  hint: Install @sdods/db and configure env.db in envs/<env>.yaml.

env.db is configured, so it is the first half of the hint that applies.

What I cannot work out is whether this is a supported configuration or an accident. sdods config validate is clean, so the config layer clearly does not consider a db source to imply the dependency. Nothing fails until that one scenario runs, which in our case is forty minutes in.

Two questions, really. Is the package meant to be present in every install and we have broken ours? And if it is genuinely optional, is there a way to make the missing dependency a configuration error at validate time rather than a run-time failure three quarters of the way through a nightly?

No answers yet

Know the answer?

Wrap commands and output in triple backticks and they will render as a code block.

Checking whether you’re signed in…

Have a different question? Ask it.

Related