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

Bug: "unable to retrieve automatically the package name and version" #21

Closed
selfagency opened this issue Feb 24, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@selfagency
Copy link

selfagency commented Feb 24, 2024

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:

CleanShot 2024-02-24 at 16 32 14@2x

Reproduction

Gist

Environment

Bun 1.0.28
Node 18.17.1

@selfagency selfagency added the bug Something isn't working label Feb 24, 2024
@adbayb
Copy link
Owner

adbayb commented Apr 20, 2024

@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?

@adbayb
Copy link
Owner

adbayb commented Jun 17, 2024

Closed since not reproducible.
@selfagency Feel free to re-open it if needed.

@adbayb adbayb closed this as completed Jun 17, 2024
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
None yet
Development

No branches or pull requests

2 participants