Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

bug(d1): too many parameters when preparing a D1 statement #504

Closed
@4x4notfound

Description

@4x4notfound

just upgraded to wrangler 2.10.0 and getting new D1_ERROR which has the new miniflare version

[cause]: Error: Error: RangeError: Too many parameter values were provided at D1Database._send (node_modules/@miniflare/d1/src/d1js.ts:149:16)

I'm only trying to bind 4 values. Example

db
      .prepare(
        'INSERT INTO node (urn, nid, nss, fragment) VALUES (?1, ?2, ?3, ?4) \
        ON CONFLICT(urn) DO UPDATE SET fragment = excluded.fragment'
      )
      .bind(id, nid, nss, fc)
      .run()

Note this runs fine in CF workers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions