-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
I'm trying to use this package in a modern TypeScript setup and it's failing both during build time and when running in dev mode with tsx.
The minimal reproduction steps are at https://github.com/NatoBoram/node-bitbucket-bug-report.
import type { APIClient } from "bitbucket"
import { Bitbucket } from "bitbucket"
import { BITBUCKET_BASE_URL, BITBUCKET_TOKEN } from "./node/env.js"
export const bitbucket: APIClient = new Bitbucket({
auth: { token: BITBUCKET_TOKEN },
baseUrl: BITBUCKET_BASE_URL.toString(),
request: { agent: "@natoboram/node-bitbucket-bug-report", fetch: fetch },
})I captured the failures in a GitHub Workflow: https://github.com/NatoBoram/node-bitbucket-bug-report/actions/runs/10907449165
SyntaxError: The requested module 'bitbucket' does not provide an export named 'Bitbucket'
/home/nato/Code/github.com/NatoBoram/node-bitbucket-bug-report/src/client.ts:2
import { Bitbucket } from "bitbucket"
^
SyntaxError: The requested module 'bitbucket' does not provide an export named 'Bitbucket'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:171:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:254:5)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:482:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)
A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled
node_modules/.pnpm/bitbucket@2.12.0/node_modules/bitbucket/src/error/types.ts:4:1 - error TS1287: A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled.
4 export abstract class HTTPError extends Error {
~~~~~~
Found 1 error in node_modules/.pnpm/bitbucket@2.12.0/node_modules/bitbucket/src/error/types.ts:4
k257588376
Metadata
Metadata
Assignees
Labels
No labels