zeke / california-license-plates

A silly tool to search the California DMV website for available custom license plate names.
16 stars 5 forks source link

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value: #2

Closed alberttwong closed 2 months ago

alberttwong commented 2 months ago
albert@albertonehouse california-license-plates % npx california-license-plates dohardthg
node:internal/process/promises:394
    triggerUncaughtException(err, true /* fromPromise */);
    ^

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(query.length <= MAX_CHARS)

    at validate (/Users/albert/sandbox/california-license-plates/lib/validate.js:8:3)
    at prime (/Users/albert/sandbox/california-license-plates/lib/prime.js:7:3)
    at search (/Users/albert/sandbox/california-license-plates/lib/search.js:5:44)
    at main (/Users/albert/sandbox/california-license-plates/cli.js:9:38)
    at Object.<anonymous> (/Users/albert/sandbox/california-license-plates/cli.js:22:1)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
    at Module.load (node:internal/modules/cjs/loader:1317:32)
    at Module._load (node:internal/modules/cjs/loader:1127:12)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}

Node.js v22.8.0
alberttwong commented 2 months ago

I understand this means my license isn't between 2-7 chars.