bun-promptx
bun-promptx copied to clipboard
Failed to open library. This is usually caused by a missing library or an invalid library path.
I got an error:
9 | filename = `../release/promptx-${platform}-amd64.${suffix}`;
10 | } else {
11 | filename = `../release/promptx-${platform}-${arch}.${suffix}`;
12 | }
13 | var location = new URL(filename, import.meta.url).pathname;
14 | var { symbols } = dlopen(location, {
^
ERR_DLOPEN_FAILED: Failed to open library. This is usually caused by a missing library or an invalid library path.
syscall: "dlopen"
at bun:ffi:61:41
at D:\Code\Whatever\example.com\node_modules\bun-promptx\dist\index.mjs:14:19
On Windows 11 with Powershell 7.
My script was simple:
import { mkdir } from "node:fs/promises";
import { createPrompt } from 'bun-promptx'
const title = createPrompt("Enter title: ")
const tags = createPrompt("Enter tags: ")
const metadata = `---
title: '${title}'
date: '${new Date()}'
tags: [${tags}]
draft: true
---
`
const dir = "path/to/dir"
await mkdir(dir, { recursive: true });
await Bun.write(`${dir}/index.md`, metadata);
I have the same Issue on Bun 1.1.3 @wobsoriano
@just-maik I went with just prompt
in bun. it works but without styling & all.
Issue still persists on compile, Bun v1.1.22, Ubuntu 24.04 x64
Using the first example at README.md
bun build --compile --target=bun-linux-x64 ./index.ts --outfile devbuild-linux