Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

typescript es6 import, TypeError: Cannot read property 'start' of undefined #1398

@davidbielik

Description

@davidbielik

Environment details

  • OS: Mac OS
  • Node.js version: 14.15.4
  • npm version: 7.21.1
  • @google-cloud/trace-agent version: 5.1.5

Steps to reproduce

  1. import TraceAgent from '@google-cloud/trace-agent'
  2. Run TraceAgent.start();
  3. Observe the error TypeError: Cannot read property 'start' of undefined

To fix this, I needed to instead import * as TraceAgent

Suggestions/Questions:

  1. Can this be added to the readme, to help with future integrators using es6/typescript imports?
  2. I wonder why this wasn't caught by typescript? is there something wrong with the typing provided?

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: cloudtraceIssues related to the googleapis/cloud-trace-nodejs API.triage meI really want to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions