Skip to content

fix: Add esm module type to package.json to resolve import errors#3

Open
BlakeSpiers wants to merge 1 commit into
danielxceron:masterfrom
BlakeSpiers:fix/add-esm-module-type
Open

fix: Add esm module type to package.json to resolve import errors#3
BlakeSpiers wants to merge 1 commit into
danielxceron:masterfrom
BlakeSpiers:fix/add-esm-module-type

Conversation

@BlakeSpiers

@BlakeSpiers BlakeSpiers commented Feb 12, 2026

Copy link
Copy Markdown

Without the change, the importing of named exports causes errors with tsx;

import {
YoutubeTranscript,
} from "@danielxceron/youtube-transcript";

Causes:

SyntaxError: The requested module '@danielxceron/youtube-transcript' does not provide an export named 'YoutubeTranscript'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:226:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:335:5)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)

Without the change, the importing of named exports causes runtime errors;
SyntaxError: The requested module '@danielxceron/youtube-transcript'
does not provide an export named 'YoutubeTranscript'...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant