Skip to content

bug: logto cli error #7574

@IbuoCloud

Description

@IbuoCloud

Describe the bug

root@vmi2717290:/tmp# logto db seed
file:///usr/lib/node_modules/@logto/cli/lib/database.js:4
import { DatabaseError } from 'pg-protocol';
^^^^^^^^^^^^^
SyntaxError: Named export 'DatabaseError' not found. The requested module 'pg-protocol' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'pg-protocol';
const { DatabaseError } = pkg;

at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
at async loadESM (node:internal/process/esm_loader:91:5)
at async handleMainPromise (node:internal/modules/run_main:65:12)

Node.js v18.12.0
help me friends

Expected behavior

solve this problem

How to reproduce?

nodejs 18.12.0 install the cli and execute db seed

Environment

Self-hosted (Docker image)

Screenshots

No response

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