question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CopySourceOptions, CopyDestinationOptions is not a constructor

See original GitHub issue

Description

Dependencies from package-lock.json

"minio":  "7.0.27"
"@types/minio": "7.0.13"
"typescript":  "4.6.3"

minimal reproducible example

import {
  CopyDestinationOptions,
  CopySourceOptions,
} from 'minio';

...

const copySourceOption1 = new CopySourceOptions({
  Bucket: 'bucket1',
  Object: 'demo-bucket/1.json',
});

const destOption = new CopyDestinationOptions({
  Bucket: 'bucket1',
  Object: 'compose-bucket/demo-compose.json',
});

Error (node:492239) UnhandledPromiseRejectionWarning: TypeError: minio_1.CopySourceOptions is not a constructor

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
prakashsvmxcommented, Apr 19, 2022

Please update the import statements like in examples.

e.g. var Helpers = require("../dist/main/helpers")

use it like:

new Helpers.CopySourceOptions( {})

we will try adding all module/import builds in near future.

0reactions
z-lionelcommented, Nov 1, 2022

the types have not been updated for few releases now. we will update it for the latest release. Please feel free to send a PR.

i still have the same problem at version like this “minio”: “^7.0.32”, “@types/minio”: “^7.0.14”,

Read more comments on GitHub >

github_iconTop Results From Across the Web

CopyObjectCommand | S3 Client - AWS SDK for JavaScript v3
The copy request charge is based on the storage class and Region that you specify for the destination object. For pricing information, see...
Read more >
Java IndexOutOfBoundsException “Source Does Not Fit in Dest”
Therefore, using a constructor is a good option for copying immutable objects like Integers and Strings. 4.3. addAll.
Read more >
Read access violation when trying to create copy constructor ...
I'm just wondering if there's any flaws in this DeleteList method. // Delete all elements in the linked list // Not only do...
Read more >
azure.storage.blob.BlobClient class | Microsoft Learn
Uncommitted blocks are not copied. At the end of the copy operation, the destination blob will have the same committed block count as...
Read more >
Working With Files - Gradle User Manual
They all share most of the configuration options of Copy , including ... You can not change the destination path of empty directories...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found