-
Notifications
You must be signed in to change notification settings - Fork 98
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
typescript es6 import, TypeError: Cannot read property 'start' of undefined #1398
Comments
GitHub issue #1398 indicates that a specific incantation is required when using "import" with the trace-agent. This PR updates the README to mention this.
I'm part of the team at Google that maintains the Trace backend and we also own this repository. I'm not a Javascript expert, so I'm flying blind a bit and would definitely appreciate your comments on the PR I created to update the README.md. Let me know if there's a clearer way to say it. I'm not sure why this wasn't caught by Typescript. |
Thanks @dnoe One quick correction to your merged PR:
instead of
|
Thanks for the quick response! I will figure out the proper way to update that README.md so the bot accepts it and we'll get that merged. |
GitHub issue #1398 indicates that a specific incantation is required when using "import" with the trace-agent. This PR updates the README to mention this.
* Update READM partials to mention how to use import GitHub issue #1398 indicates that a specific incantation is required when using "import" with the trace-agent. This PR updates the README to mention this. * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Environment details
@google-cloud/trace-agent
version: 5.1.5Steps to reproduce
import TraceAgent from '@google-cloud/trace-agent'
TraceAgent.start();
TypeError: Cannot read property 'start' of undefined
To fix this, I needed to instead
import * as TraceAgent
Suggestions/Questions:
The text was updated successfully, but these errors were encountered: