graphql-live-query icon indicating copy to clipboard operation
graphql-live-query copied to clipboard

Yarn Pnp: @n1ru4l/graphql-live-query tried to access tslib

Open simPod opened this issue 3 years ago • 5 comments

Getting this error:

Error: @n1ru4l/graphql-live-query tried to access tslib, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

when using yarn (v3.2) Pnp.

with

"@n1ru4l/graphql-live-query@npm:^0.10.0":
  version: 0.10.0
  resolution: "@n1ru4l/graphql-live-query@npm:0.10.0"
  peerDependencies:
    graphql: ^15.4.0 || ^16.0.0
  checksum: c50414f56f9aa7bc60cf73847498fe94dc220f069343a4b8a3feb4f94f588649ab5e9c713e45a7d9c930c0d4337d861fbdc971350b90147eec9215503bb8aeaa
  languageName: node
  linkType: hard

simPod avatar Aug 11 '22 19:08 simPod

@simPod Do you know how to resolve this? I never used pnp or have intentions of using it.

n1ru4l avatar Aug 12 '22 08:08 n1ru4l

I believe tslib must be added to the dependencies (example https://github.com/doug-martin/nestjs-query/pull/987/commits/308db2fbda301cc56987b35f42fce890dd0bf46a) since cjs/index.js requires it const tslib_1 = require("tslib");

simPod avatar Aug 12 '22 08:08 simPod

@n1ru4l If I open a PR adding tslib to the deps does that sound acceptable?

ChrisZieba avatar Aug 23 '22 15:08 ChrisZieba

@ChrisZieba Yes!

n1ru4l avatar Aug 23 '22 15:08 n1ru4l

https://github.com/n1ru4l/graphql-live-query/pull/972

ChrisZieba avatar Aug 23 '22 15:08 ChrisZieba