Bug: "unable to retrieve automatically the package name and version"
selfagency opened this issue · comments
daniel sieradski commented
Description
Getting the error:
error: Termost was unable to retrieve automatically the package name and version. To fix it, use `termost({ name, description, version })` to define them manually.
at I (/$bunfs/root/exporter:21735:11)
at Z (/$bunfs/root/exporter:21704:47)
at /$bunfs/root/exporter:22507:15
But when I try to do that I get a TypeScript error and the same error above regardless:
Reproduction
Environment
Bun 1.0.28
Node 18.17.1
Ayoub Adib commented
@selfagency Your package metadata (including name
, description
, and version
) needs to be put in the first argument.
The second argument is for callbacks 👍 .
The following change should work:
const program = termost<ProgramContext>(
{
name: "wpconv",
description: "WordPress data converter",
version: "0.0.1",
},
{
onException(error) {
log.error(error);
},
onShutdown() {
log.info("Fin.");
},
},
);
Can you confirm it?
Ayoub Adib commented
Closed since not reproducible.
@selfagency Feel free to re-open it if needed.