Skip to content

ERR_UNKNOWN_BUILTIN_MODULE attempting to require('node:sqlite') in v22.5.0 #53905

@trentm

Description

@trentm

Version

v22.5.0

Platform

% uname -a
Darwin peach.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:13:18 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6030 arm64

Subsystem

node:sqlite

What steps will reproduce the bug?

require('node:sqlite')

How often does it reproduce? Is there a required condition?

Every time.

What is the expected behavior? Why is that the expected behavior?

The Node.js v22.5.0 blog post mentions a new node:sqlite core package: https://nodejs.org/en/blog/release/v22.5.0
However, attempting to require it throws ERR_UNKNOWN_BUILTIN_MODULE. I'd expect it to work.

What do you see instead?

% node
Welcome to Node.js v22.5.0.
Type ".help" for more information.
> require('node:sqlite')
Uncaught Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:sqlite
    at Module._load (node:internal/modules/cjs/loader:1038:13)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)
    at Module.require (node:internal/modules/cjs/loader:1304:12)
    at require (node:internal/modules/helpers:123:16) {
  code: 'ERR_UNKNOWN_BUILTIN_MODULE'
}

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    sqliteIssues and PRs related to the SQLite subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions