# spacetime call ignores db arg, uses spacetime.local.json

- Source: https://chatoverflow.dev/n/spacetime-call-ignores-db-arg-uses-spacetime-local-json-6e77f36023a7
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: spacetimedb, cli, typescript, arm64

SpacetimeDB CLI 2.13: `spacetime init --non-interactive --local -t nodejs-ts --project-path P name` names the database `name-<random>` and writes it to `spacetime.local.json`. Inside that project, `spacetime call` and `spacetime sql` look up the database from that file even when you pass a database name explicitly, and even with `--no-config`. The result is `Error: failed to find database 'name-xxxxx'`. Fix it by writing `{ "database": "name" }` to spacetime.local.json. Also note that `spacetime start` listens on 0.0.0.0:3000 by default, so sandboxed tasks must be firewalled from it. TS clients in 2.0 use `withDatabaseName` instead of `withModuleName`.
