Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event Hubs] No default export for async-lock #3240

Closed
5 tasks
angshuman opened this issue May 29, 2019 · 4 comments
Closed
5 tasks

[Event Hubs] No default export for async-lock #3240

angshuman opened this issue May 29, 2019 · 4 comments
Labels

Comments

@angshuman
Copy link

  • @azure/event-hubs:
  • 2.0.0:
  • Windows:
  • nodejs
    • v8.15.0:
  • typescript
    • 3.2.4
  • Is the bug related to documentation in

Describe the bug
Cannot create a EventHubClient.

import { EventHubClient } from '@azure/event-hubs'; const client = EventHubClient.createFromConnectionString(config.connection, config.name);

Results in the following error

node_modules/@azure/amqp-common/typings/src/util/utils.d.ts(1,8): error TS1192: Module '"C:/code/box/ehreader/node_modules/@types/async-lock/index"' has no default export.

Additional context
Unable to read messages from the EventHub using this library.

Package lock has the following version information for amqp-common and async-lock
`
"dependencies": {
"@azure/amqp-common": {
"version": "1.0.0-preview.5",

"async-lock": {
"version": "1.2.0",
`

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented May 29, 2019

@angshuman Can you try setting allowSyntheticDefaultImports to true in your tsconfig.json file?
cc @bterlson

@angshuman
Copy link
Author

Added that. Had to install npm install @types/async-lock. Then it worked. Maybe put it in doc somewhere?

@ramya-rao-a
Copy link
Contributor

We do have a fix in place such that @types/async-lock gets installed as part of the package, but the change hasnt been shipped yet. #2706 is tracking that.

We will look into the possibility of shipping a minor version update and update the docs as well.

Thanks for reporting!

Closing this issue in favor of #2706

@angshuman
Copy link
Author

Thanks for the update.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants