Paul
Paulโ€ข3w ago

Can't build source using a mac

mac 15.2 node 18.10 npm: 8.19.2 latest rust latest pnpm instructions:
1) git clone https://github.com/get-convex/convex-backend
2) npm clean-install --prefix scripts
3) run cargo run -p local_backend --bin convex-local-backend
1) git clone https://github.com/get-convex/convex-backend
2) npm clean-install --prefix scripts
3) run cargo run -p local_backend --bin convex-local-backend
Getting:
error: failed to run custom build command for `isolate v0.1.0 (/Users/paul/development/src/github/convex-backend/crates/isolate)`

Caused by:
process didn't exit successfully: `/Users/paul/development/src/github/convex-backend/target/debug/build/isolate-d9f57c602cb54e55/build-script-build` (exit status: 1)
error: failed to run custom build command for `isolate v0.1.0 (/Users/paul/development/src/github/convex-backend/crates/isolate)`

Caused by:
process didn't exit successfully: `/Users/paul/development/src/github/convex-backend/target/debug/build/isolate-d9f57c602cb54e55/build-script-build` (exit status: 1)
Similar to: https://github.com/get-convex/convex-backend/issues/7 but that is windows machine.
GitHub
Please consider build instructions for Windows ยท Issue #7 ยท get-con...
Hi, I am trying out convex; However, the justfile etc seem to heavily favor a unix environment. This project does provide Windows releases, so I was hoping to perform the same release build. I trie...
40 Replies
Convex Bot
Convex Botโ€ข3w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
lee
leeโ€ข3w ago
i just cloned the repo, ran those commands, and it worked for me. how did you install rust? maybe it's using the wrong version
$ cargo version -v
cargo 1.85.0-nightly (769f622e1 2024-12-14)
$ cargo version -v
cargo 1.85.0-nightly (769f622e1 2024-12-14)
does just rush build -v show more errors? oh and i'm on mac 15.0.1
Paul
PaulOPโ€ข3w ago
Thanks for the reply. Here's mine:
cargo version -v
cargo 1.83.0 (5ffbef321 2024-10-29)
release: 1.83.0
commit-hash: 5ffbef3211a8c378857905775a15c5b32a174d3b
commit-date: 2024-10-29
host: aarch64-apple-darwin
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.7.1 (sys:0.4.74+curl-8.9.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Mac OS 15.2.0 [64-bit]
cargo version -v
cargo 1.83.0 (5ffbef321 2024-10-29)
release: 1.83.0
commit-hash: 5ffbef3211a8c378857905775a15c5b32a174d3b
commit-date: 2024-10-29
host: aarch64-apple-darwin
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.7.1 (sys:0.4.74+curl-8.9.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Mac OS 15.2.0 [64-bit]
lee
leeโ€ข3w ago
cool looks like it's using the wrong version of rust. how did you install rust? the readme says
We recommend installing Cargo via rustup. The Rust nightly version specified in rust-toolchain Assuming you installed Rust/Cargo with rustup, this will install automatically.
Paul
PaulOPโ€ข3w ago
I think I used:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh does just rush build -v show more errors?
just rush build -v
cd /Users/paul/development/src/github/convex-backend; "/Users/paul/development/src/github/convex-backend/scripts/rush_from_npm-packages.sh" "$@"
Found configuration in /Users/paul/development/src/github/convex-backend/npm-packages/rush.json


Rush Multi-Project Build Tool 5.147.1 - https://rushjs.io
Node.js version is 18.12.0 (LTS)


Starting "rush build"


ERROR: Link flag invalid.
Did you run "rush install" or "rush update"?
error: Recipe `rush` failed on line 44 with exit code 1
just rush build -v
cd /Users/paul/development/src/github/convex-backend; "/Users/paul/development/src/github/convex-backend/scripts/rush_from_npm-packages.sh" "$@"
Found configuration in /Users/paul/development/src/github/convex-backend/npm-packages/rush.json


Rush Multi-Project Build Tool 5.147.1 - https://rushjs.io
Node.js version is 18.12.0 (LTS)


Starting "rush build"


ERROR: Link flag invalid.
Did you run "rush install" or "rush update"?
error: Recipe `rush` failed on line 44 with exit code 1
lee
leeโ€ข3w ago
at this point i would start pestering Claude to figure out why the rust version is incorrect
Paul
PaulOPโ€ข3w ago
Alright, what I'll do. Is I will uninstall rust and start again.
lee
leeโ€ข3w ago
you could try just rush install ? i think the cargo build is supposed to do that automatically, but this error indicates it might not have
Paul
PaulOPโ€ข3w ago
This time failed with:
โœ˜ [ERROR] Could not resolve "jwt-decode"
โœ˜ [ERROR] Could not resolve "jwt-decode"
And a whole host of yarn failures I think it's best if I just focus on getting the latest rust release and then go from there ๐Ÿ˜„
lee
leeโ€ข3w ago
claude suggests rustup show as a command that can tell you why it's using a certain version of rust
Paul
PaulOPโ€ข3w ago
Alright, I re-installed
cargo version -v

cargo 1.84.0 (66221abde 2024-11-19)
release: 1.84.0
commit-hash: 66221abdeca2002d318fde6efff516aab091df0e
commit-date: 2024-11-19
host: aarch64-apple-darwin
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.7.1 (sys:0.4.74+curl-8.9.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Mac OS 15.2.0 [64-bit]
cargo version -v

cargo 1.84.0 (66221abde 2024-11-19)
release: 1.84.0
commit-hash: 66221abdeca2002d318fde6efff516aab091df0e
commit-date: 2024-11-19
host: aarch64-apple-darwin
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.7.1 (sys:0.4.74+curl-8.9.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Mac OS 15.2.0 [64-bit]
lee
leeโ€ข3w ago
to double check, you're running cargo version -v from the root of the convex-backend repo, right?
Paul
PaulOPโ€ข3w ago
no, a new terminal
lee
leeโ€ข3w ago
oh so what is cargo version from the root of convex-backend
Paul
PaulOPโ€ข3w ago
I'm doing another install, I see at the beginning:
paul@MacBookPro convex-backend % cargo run -p local_backend --bin convex-local-backend
info: syncing channel updates for 'nightly-2024-12-16-aarch64-apple-darwin'
info: latest update on 2024-12-16, rust version 1.85.0-nightly (c26db435b 2024-12-15)
paul@MacBookPro convex-backend % cargo run -p local_backend --bin convex-local-backend
info: syncing channel updates for 'nightly-2024-12-16-aarch64-apple-darwin'
info: latest update on 2024-12-16, rust version 1.85.0-nightly (c26db435b 2024-12-15)
cargo version yields: cargo 1.85.0-nightly (769f622e1 2024-12-14) and I still get:
error: failed to run custom build command for `isolate v0.1.0 (/Users/paul/development/src/github/convex-backend/crates/isolate)`
error: failed to run custom build command for `isolate v0.1.0 (/Users/paul/development/src/github/convex-backend/crates/isolate)`
lee
leeโ€ข3w ago
any more to that error message? i would guess we're back to figuring out the just rush install and just rush build errors
Paul
PaulOPโ€ข3w ago
This is the rest: https://pastebin.com/raw/LqYVA8Z3 Which gives the following:
cd /Users/paul/development/src/github/convex-backend; "/Users/paul/development/src/github/convex-backend/scripts/rush_from_npm-packages.sh" "$@"
Found configuration in /Users/paul/development/src/github/convex-backend/npm-packages/rush.json


Rush Multi-Project Build Tool 5.147.1 - https://rushjs.io
Node.js version is 18.12.0 (LTS)


Starting "rush build"


ERROR: Link flag invalid.
Did you run "rush install" or "rush update"?
error: Recipe `rush` failed on line 44 with exit code 1
cd /Users/paul/development/src/github/convex-backend; "/Users/paul/development/src/github/convex-backend/scripts/rush_from_npm-packages.sh" "$@"
Found configuration in /Users/paul/development/src/github/convex-backend/npm-packages/rush.json


Rush Multi-Project Build Tool 5.147.1 - https://rushjs.io
Node.js version is 18.12.0 (LTS)


Starting "rush build"


ERROR: Link flag invalid.
Did you run "rush install" or "rush update"?
error: Recipe `rush` failed on line 44 with exit code 1
ballingt
ballingtโ€ข3w ago
The Yarn errors in here may be because you have yarn installed globally, or have some yarn config files sitting around You should delete .pnp.cjs wherever it is
Paul
PaulOPโ€ข3w ago
I'm cloning the repo and not doing any changes. Yarn is installed globally though. there's no such file in the root, unless it's in other subfolders?
ballingt
ballingtโ€ข3w ago
The errors say ../../../../../../.pnp.cjs:37:31: so maybe your home directory maybe a directory you have convex checked out under
Paul
PaulOPโ€ข3w ago
this is the directory structure. /Users/paul/development/src/github/convex-backend
ballingt
ballingtโ€ข3w ago
ok, so the directories to check are /Users/, /Users/paul, /Users/paul/development, /Users/paul/development/src, and /Users/pault/development/src/github unless you want to count those ..
Paul
PaulOPโ€ข3w ago
I removed yarn ๐Ÿ˜„. Although I need it for some projects. ๐Ÿ˜ญ
ballingt
ballingtโ€ข3w ago
you probably dont' need it installed globally like this, it breaks everything under it that uses esbuild
Paul
PaulOPโ€ข3w ago
Same issue though. ๐Ÿ™
ballingt
ballingtโ€ข3w ago
https://github.com/evanw/esbuild/issues/3338 Still have the yarn errors? @Paul What's your goal here, building convex-backend requires some setup, do you just want to run a binary?
Paul
PaulOPโ€ข3w ago
this is the full log: https://pastebin.com/raw/a6Dv94pP
lee
leeโ€ข3w ago
does ls /Users/.pnp.cjs /Users/paul/.pnp.cjs /Users/paul/development/.pnp.cjs /Users/paul/development/src/.pnp.cjs /Users/paul/development/src/github/.pnp.cjs print anything?
ballingt
ballingtโ€ข3w ago
../../convex prepare: The Yarn Plug'n'Play manifest forbids importing "jwt-decode" here because it's not listed as a dependency of this package:
../../convex prepare: ../../../../../../.pnp.cjs:37:31:
../../convex prepare: The Yarn Plug'n'Play manifest forbids importing "jwt-decode" here because it's not listed as a dependency of this package:
../../convex prepare: ../../../../../../.pnp.cjs:37:31:
Paul
PaulOPโ€ข3w ago
the goal is to run from source and then to start making changing and having a poke around ๐Ÿ˜„
ballingt
ballingtโ€ข3w ago
This error message says there's still a .pnp.cjs there
Paul
PaulOPโ€ข3w ago
ls: /Users/.pnp.cjs: No such file or directory
ls: /Users/paul/development/.pnp.cjs: No such file or directory
ls: /Users/paul/development/src/.pnp.cjs: No such file or directory
ls: /Users/paul/development/src/github/.pnp.cjs: No such file or directory
/Users/paul/.pnp.cjs
ls: /Users/.pnp.cjs: No such file or directory
ls: /Users/paul/development/.pnp.cjs: No such file or directory
ls: /Users/paul/development/src/.pnp.cjs: No such file or directory
ls: /Users/paul/development/src/github/.pnp.cjs: No such file or directory
/Users/paul/.pnp.cjs
lee
leeโ€ข3w ago
yep there it is ๐Ÿ˜„
Paul
PaulOPโ€ข3w ago
What's the issue?
ballingt
ballingtโ€ข3w ago
That's what you need to delete
lee
leeโ€ข3w ago
rm /Users/paul/.pnp.cjs (or mv /Users/paul/.pnp.cjs /Users/paul/backup.pnp.cjs)
ballingt
ballingtโ€ข3w ago
The thread I linked has more nuanced solutions (pnpIgnorePatterns)
Paul
PaulOPโ€ข3w ago
Alright I will check that out. I'm rebuilding again... Thanks @Lee and @Tom! ๐Ÿ‘
ballingt
ballingtโ€ข3w ago
Sounds like we could write a script to look for these files as a pre-check, if this error message had been at the top or the bottom do you think you would have been able to figure out what to do? It's hard to write code that works on every machine when people have different setups
Paul
PaulOPโ€ข3w ago
Convex is now running from source. Thank you for the help. Would never have figured it was yarn .pnp lol

Did you find this page helpful?