Closed RomanADavis closed 1 year ago
hm bun x and bunx are identical there is an open issue on the bun repo for bunx to not be installed
I actually had this same issue at first and fly.io hotfixed their cli for me
for me when I reinstalled bun (just ran the curl script again) the next day bunx magically appeared like it should
but if its not working with bun x
than the issue is somewhere else
I just loaded your environment variables into my project (didnt do anything to your db just checked if drizzle would prompt me to go ahead with the schema changes) and both bunx
and bun x
worked fine
maybe its a dependency issue?
here is my package.json
{
"name": "the-beth-stack",
"module": "src/index.tsx",
"type": "module",
"scripts": {
"db:push": "bunx drizzle-kit push:sqlite",
"db:studio": "bunx drizzle-kit studio",
"dev": "bun run --watch src/index.tsx"
},
"devDependencies": {
"@flydotio/dockerfile": "latest",
"bun-types": "latest",
"drizzle-kit": "^0.19.6",
"typed-html": "^3.0.1"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"@elysiajs/html": "^0.5.2",
"@libsql/client": "^0.3.0",
"drizzle-orm": "^0.27.2",
"elysia": "^0.5.22",
"twind": "^0.16.19"
}
}
I downloaded the zip, and tried to run the script to reduce the chance that some change I had made had made the code inoperable.
I went and ran the curl script. Got a slightly different error.
bun run db:push
$ bunx drizzle-kit push:sqlite
/bin/bash: bunx: command not found
error: script "db:push" exited with code 127
Tried reinstalling, but no changes
bun install
[3.86ms] ".env"
bun install v0.6.14 (b5665739)
Checked 239 installs across 278 packages (no changes) [2.53s]
Dependencies should be the same as in the main branch on github:
{
"name": "the-beth-stack",
"module": "src/index.tsx",
"type": "module",
"scripts": {
"db:push": "bunx drizzle-kit push:sqlite",
"db:studio": "bunx drizzle-kit studio",
"dev": "concurrently \"bun run --watch src/index.tsx\" \"bun run tw:dev\"",
"tw": "bunx tailwindcss -i ./src/styles.css -o ./tailwind-gen/styles.css",
"tw:dev": "bunx tailwindcss -i ./src/styles.css -o ./tailwind-gen/styles.css --watch"
},
"devDependencies": {
"@flydotio/dockerfile": "latest",
"bun-types": "latest",
"concurrently": "^8.2.0",
"drizzle-kit": "^0.19.6",
"tailwindcss": "^3.3.3",
"typed-html": "^3.0.1"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"@elysiajs/html": "^0.5.2",
"@libsql/client": "^0.3.0",
"drizzle-orm": "^0.27.2",
"elysia": "^0.5.22"
}
}
and then same error as before if you use bun x
instead of bunx
?
Slightly different, but effectively the same; says that bunx was not found. The error for running bun x drizzle-kit push:sqlite is:
bun x drizzle-kit push:sqlite
[3.74ms] ".env"
No config path provided, using default 'drizzle.config.ts'
Reading config file '/mnt/c/Users/Roman/code/the-beth-stack-main/drizzle.config.ts'
drizzle-kit: v0.19.6
drizzle-orm: v0.27.2
37869 | code;
37870 | constructor(message, code, cause) {
37871 | if (code !== void 0) {
37872 | message = `${code}: ${message}`;
37873 | }
37874 | super(message, { cause });
^
LibsqlError: HRANA_WEBSOCKET_ERROR: Unexpected server response: 401
code: "HRANA_WEBSOCKET_ERROR"
at new LibsqlError (/mnt/c/Users/Roman/code/the-beth-stack-main/node_modules/drizzle-kit/index.cjs:37874:8)
at mapHranaError (/mnt/c/Users/Roman/code/the-beth-stack-main/node_modules/drizzle-kit/index.cjs:42986:11)
at /mnt/c/Users/Roman/code/the-beth-stack-main/node_modules/drizzle-kit/index.cjs:43120:16
Idea: Maybe I should update WSL. It's been a while. Trying that next.
EDIT: Whelp, nevermind.
wsl --update
Checking for updates.
The most recent version of Windows Subsystem for Linux is already installed.
Currently seeing about how I could completely delete wsl and reinstall everything. If that doesn't work, then I'll go complain to those guys. Thanks.
Sounds good. I’m going to close this for now, but feel free to reopen if there something in this repo that can be improved.
Idea: What version of bun are you using?
bun --version
0.6.14
I was on 0.6.14 as well. Although 0.7.0 just dropped may upgrading will help?
+1 I do have bunx working, but getting the websocket error. For me it's actually a 404
Seems like libsql client was not tested with bun, and could cause websocket/platform errors?
+1 I do have bunx working, but getting the websocket error. For me it's actually a 404
i'm having the same issue, maybe newer versions of bun is not working properly?
When I try to run the script, it says "bunx: command not found."
This itself is workaroundable, just use "bun x," so, "bun x drizzle-kit push:sqlite," but this itself leads to:
and
give me
I've tried with and without quotes. Any ideas?