Skip to content

__dirname is not defined #9

@louis-cai

Description

@louis-cai

Error generating audio for section 0: ReferenceError: __dirname is not defined

async function getVoiceFile(id) { if (fs?.readFile) { const file = path.resolve(import.meta.dirname ?? __dirname, ../voices/${id}.bin); const { buffer } = await fs.readFile(file); return buffer; }

I think __dirname is the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions