[Bug]: First-time Installation fails if Turso-db not already installed and logged in
What happened?
When attempting to set up StudioCMS with npm install studiocms, I said 'yes' to install Turso DB which seems to install correctly but then proceeds to crash the entire installation process.
Package
studiocms
Version
0.2.0
What browsers are you seeing the problem on?
No response
Relevant log output
npm create studiocms
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
> npx
> create-studiocms
[01:40 PM]: Starting interactive CLI...
┌ StudioCMS Interactive CLI - Project Setup
│
● Using /Users/marc/Documents/StudioCMS testing as project directory
│
◇ What StudioCMS package would you like to use?
│ StudioCMS
│
◇ How would you like to start your new StudioCMS project?
│ StudioCMS with a blog
│
◇ Would you like to install dependencies?
│ Yes
│
◇ What kind of environment file would you like to create?
│ Use Interactive .env Builder
│
◇ Would you like us to setup a new Turso DB for you? (Runs `turso db create`)
│ Yes
│
■ Turso CLI is not installed.
│
◇ Would you like to install Turso CLI now?
│ Yes
Welcome to the Turso installer!
.: .:
.$$. $$: .$$$: $$$^ $$: ~$^
.$$$!:$$$ .$$$$~ .$$$$^ !$$~^$$$~
$$$$$$ .$$$$$~ .$$$$$^ $$$$$$:
!$$$$$$$$$$~ .$$$$$$$$$$$
:$$$$$$$$~ .$$$$$$$$!
.$$$$$$$$~ .$$$$$$$$^
.$$$$$$$$! ~$! :$$. :$$$$$$$$^
$$$$$$$$$$$!^::$$$$$^...................:$$$$$!.^~$$$$$$$$$$$:
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
:$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!
:^!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$~:.
:$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$:
:$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$~
^$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$~.
:$$$$$: .^~!$$$$$$$$$$$$$$$$$$$$$$!^:. $$$$$!
:$$$$$!. .!$$$$$$$$$$$$. .^$$$$$!
:$$$$$$$$$$!^:. ~$$$$$$$$$$$$ .^~$$$$$$$$$$!
:$$$$$$$$$$$$$$$. ~$$$$$$$$$$$$ $$$$$$$$$$$$$$$!
:$$$$$$$$$$$$$$$: ~$$$$$$$$$$$$ $$$$$$$$$$$$$$$!
:$$$$$$$$$$$$$$$^ ~$$$$$$$$$$$$ $$$$$$$$$$$$$$$!
:$$$$$$$$$$$$$$$~ ~$$$$$$$$$$$$ $$$$$$$$$$$$$$$!
:$$$$$$$$$$$$$$$$~^^:. ..:^~!$$$$$$$$$$$$$$$!
^$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!
:$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$~
:$$$$$$$$$$$$$:$$$$$$$$$$$$$$$$$~~$$$$$$$$$$$$~
!$$$$$$$$$$. :$$..$$! :$$^ !$! ~$$$$$$$$$$.
^$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$:
~$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$~$$$$$^$$$$$~$$$$$$~$$$$:
$$^ .$$$ $$$: ~$$^ .$$^
.. : : :. :
######################################################################## 100.0%
Installing libsql-server to /Users/marc/.turso
Downloading Darwin_x86_64 ...
######################################################################## 100.0%
Installing to /Users/marc/.turso
Updating profile /Users/marc/.zshrc
Turso will be available when you open a new terminal.
If you want to make Turso available in this terminal, please run:
source /Users/marc/.zshrc
Turso CLI installed!
If you are a new user, you can sign up with turso auth signup.
If you already have an account, please login with turso auth login.
Command completed successfully.
│
■ Error: Error: Command failed: turso auth login --headless
│ /bin/sh: turso: command not found
│
│ /bin/sh: turso: command not found
│
npm error code 1
npm error path /Users/marc/Documents/StudioCMS testing
npm error command failed
npm error command sh -c create-studiocms
npm notice
npm notice New major version of npm available! 10.9.2 -> 11.6.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.6.2
npm notice To update run: npm install -g [email protected]
npm notice
npm error A complete log of this run can be found in: /Users/marc/.npm/_logs/2025-10-23T11_40_39_236Z-debug-0.log
Oh well that is a fun issue... i'll have to look into the install scripts from turso to see if there is a easy way (if its always formatted the same) to pull that command and run it within our CLI...
This issue is related to how you usually need to reload a terminal session to activate new commands which the following section of the log explains
Installing to /Users/marc/.turso
Updating profile /Users/marc/.zshrc
Turso will be available when you open a new terminal.
If you want to make Turso available in this terminal, please run:
source /Users/marc/.zshrc
Turso CLI installed!
so is this a ZSH-specific bug?
so is this a ZSH-specific bug?
No, This is a "need to restart shell session" or "force update the source binary lists" issue...
Basically when you install new bin files (programs) some require full restart of the terminal or for manual update (some make it easier by doing this for you).
Basically what we will need to do is IF the user is installing Turso CLI, then we wait for the response above, and parse the result so that we can run the command internally that TursoCLI is asking for us to run so we can utilize the CLI right away, instead of the process exiting and failing due to "missing turso command"