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

Imports incompatible with TypeScript #155

Description

@laurentpellegrino

I am using this library with Firebase functions written in TypeScript. Since I upgraded to version 0.5.0 I am getting the following error from tslint:

node_modules/@google-cloud/error-reporting/node_modules/@google-cloud/common/build/src/service-object.d.ts:18:8 - error TS1192: Module '"/home/lpellegr/X/functions/node_modules/@types/request/index"' has no default export.

18 import r from 'request';
~

node_modules/@google-cloud/error-reporting/node_modules/@google-cloud/common/build/src/service.d.ts:17:8 - error TS1192: Module '"/home/lpellegr/X/functions/node_modules/@types/request/index"' has no default export.

17 import r from 'request';
~

node_modules/@google-cloud/error-reporting/node_modules/@google-cloud/common/build/src/util.d.ts:20:8 - error TS1192: Module '"/home/lpellegr/X/functions/node_modules/@types/duplexify/index"' has no default export.

20 import duplexify from 'duplexify';
~~~~~~~~~

node_modules/@google-cloud/error-reporting/node_modules/@google-cloud/common/build/src/util.d.ts:23:8 - error TS1192: Module '"/home/lpellegr/X/functions/node_modules/@types/request/index"' has no default export.

23 import r from 'request';

There were no issues with version 0.4.0. TypeScript 2.9.2 is used.

Activity

  1. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    on Jun 29, 2018
  2. ofrobots commented on Jun 29, 2018

    @ofrobots
    Contributor

    @lpellegr thanks for the report. I think this problem is due to one of our dependencies (@google-cloud/common) using the new allowSyntheticImports feature in TypeScript which leaks through to the users 😰.

    I think this has already been fixed upstream, and picking up a new release of the library will fix the problem.

    I believe this will go away with a new release of @google-cloud/logging is done and we pick that up here.

  3. ofrobots commented on Jun 30, 2018

    @ofrobots
    Contributor
  4. removed
    status: blockedResolving the issue is dependent on other work.
    on Jul 7, 2018
  5. self-assigned this
    on Jul 7, 2018
  6. removed
    triage meI really want to be triaged.
    🚨This issue needs some love.
    on Jul 7, 2018
  7. ofrobots commented on Jul 7, 2018

    @ofrobots
    Contributor

    Fix over in #158.

    I was confusing this issue with another one in @google-cloud/logging-winston. This did not depend on googleapis/nodejs-logging#149.

  8. ghost removed
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    on Jul 7, 2018
  9. ofrobots commented on Jul 10, 2018

    @ofrobots
    Contributor

    @lpellegr 0.5.1 has been release which should no longer have this issue. Please give this a shot and re-open or comment here if you're still running into issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: clouderrorreportingIssues related to the googleapis/nodejs-error-reporting API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions