Skip to content

Troubleshooting ​

Find the message you see, read the cause, and apply the fix. Exit code 2 means the command never ran, 1 means it failed and a retry is safe, and 3 means some work landed (exit codes).

Why does a command fail or surprise me? ​

Message or symptomCauseFix
Unrecognized flag '--config' before the subcommandOnly -c/--cwd is a root flagnoorm run build --config prod
Error: --cwd path is not a directory: …/prodIn noorm -c prod run build, -c means --cwdnoorm run build -c prod
Unknown command helpThere is no noorm helpnoorm db create --help
db create --name foo creates nothing named foodb create has no --name. The config names the databasenoorm config import dev-config.json, then noorm db create -c dev
Unknown command from noorm sql "…"The sql query rewrite needs the query to start with a SQL verb, so a leading comment defeats itnoorm sql query "…"
Error: noorm init requires an interactive terminal.No terminal, no --yesnoorm identity init …, then noorm init --yes
--dry-run leaves files in tmp/It renders SQL there with secrets resolved, and tmp/ is not gitignoredDelete tmp/, or use noorm run preview <path>

Why does the database refuse or misbehave? ​

Each server sends one error for a wrong password and an unknown account. noorm rewords it, and the server's own text is in .noorm/state/noorm.log (connection:error, fields serverCode and serverMessage).

MessageAlso sent for
Login failed for user … (SQL Server)Unknown login, login denied CONNECT SQL, Windows-only authentication
Password authentication failed for user … (PostgreSQL)Unknown role, password past VALID UNTIL
Access denied for user … (MySQL)Unknown user, no account for this client host, REQUIRE SSL account
SymptomCauseFix
The server's TLS certificate was rejected (…)The server's certificate is signed by an authority noorm does not trustSet ssl.caFile to the CA certificate, or NODE_EXTRA_CA_CERTS for the whole process. To keep encryption without validation, set ssl.rejectUnauthorized: false (details)
The server's TLS certificate was issued for a different hostname (…)The host you dial is not a name on the certificateSet tlsServerName to a name the certificate carries, or dial that name
Cannot read ssl.caFile '…': ENOENTThe path does not exist, or it resolves from another directoryUse an absolute or ~/ path, or a path relative to the project root. The CLI and TUI resolve it from the project root, the SDK from projectRoot
ssl.caFile '…' is not a PEM file (also certFile, keyFile)The file holds no -----BEGIN block, as with a DER-encoded certificateConvert it to PEM: openssl x509 -inform der -in ca.der -out ca.pem for a certificate, openssl pkey -inform der -in key.der -out key.pem for a key
ssl.caFile '…' is larger than 1 MiB (also certFile, keyFile)The path points at a file that is not a certificate or key, such as a data file or an archive. A CA bundle under 1 MiB is finePoint it at the certificate, CA bundle or key
A right password fails from NOORM_CONNECTION_PASSWORDThe compiled binary does not read .env filesExport the variable, or set it in CI
An MSSQL procedure's DEFAULT is not appliedThe SDK sends undefined as NULL, and MSSQL applies a DEFAULT only to an omitted parameter.default(value) in the Zod schema, or omit the key (details)

Next ​