esm.sh icon indicating copy to clipboard operation
esm.sh copied to clipboard

Failed to import - @google-cloud/pubsub

Open yzalium opened this issue 2 years ago • 4 comments

Hello,

This package works with npm import npm:@google-cloud/pubsub, but I'm getting an error when attempting to import with esm

Failing module

  • npm: https://www.npmjs.com/package/@google-cloud/pubsub
import { PubSub } from "https://esm.sh/@google-cloud/pubsub";

Error message

Uncaught TypeError: Cannot read properties of undefined (reading 'DEADLINE_EXCEEDED')
    at https://esm.sh/v135/@google-cloud/[email protected]/denonext/pubsub.mjs:47:99164
    at https://esm.sh/v135/@google-cloud/[email protected]/denonext/pubsub.mjs:47:458
    at https://esm.sh/v135/@google-cloud/[email protected]/denonext/pubsub.mjs:47:101751
    at https://esm.sh/v135/@google-cloud/[email protected]/denonext/pubsub.mjs:47:458
    at https://esm.sh/v135/@google-cloud/[email protected]/denonext/pubsub.mjs:47:112692
    at https://esm.sh/v135/@google-cloud/[email protected]/denonext/pubsub.mjs:47:458
    at https://esm.sh/v135/@google-cloud/[email protected]/denonext/pubsub.mjs:47:120334
    at https://esm.sh/v135/@google-cloud/[email protected]/denonext/pubsub.mjs:47:458
    at https://esm.sh/v135/@google-cloud/[email protected]/denonext/pubsub.mjs:47:124744
    at https://esm.sh/v135/@google-cloud/[email protected]/denonext/pubsub.mjs:47:458

Additional info

  • esm.sh version: v135
  • Deno version: v1.38.3 (release, aarch64-apple-darwin)

Thank you

yzalium avatar Nov 30 '23 14:11 yzalium

Any progress? I went same error when importing @google-cloud/pubsub

Ariaszzzhc avatar Jan 08 '24 07:01 Ariaszzzhc

i will check

ije avatar Jan 08 '24 10:01 ije

does npm: specifier work?

import { PubSub } from "npm:@google-cloud/pubsub"

ije avatar Jan 08 '24 10:01 ije

The import works yes. It fails later down the road when using the package because of some missing polyfills in Deno, and I wanted to try with esm in case you guys were covering those.

yzalium avatar Jan 08 '24 11:01 yzalium