Skip to content
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

Is imgix-url-builder missing as a dependency? #200

Open
WCByrne opened this issue Jan 9, 2024 · 0 comments
Open

Is imgix-url-builder missing as a dependency? #200

WCByrne opened this issue Jan 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@WCByrne
Copy link

WCByrne commented Jan 9, 2024

Versions

  • @prismicio/react: 2.7.3
  • react: 18.2.0
  • node: 18.18.2
  • yarn: 4.0.2

Reproduction

Sorry for the minimal report, happy to clarify anything if needed but this seems pretty straightforward.

It seems that PrismicImage imports imgix-url-builder but it is not listed as a dependency of this package anywhere. I'm getting TS errors about not being able to resolve the module or its types.

../../.yarn/__virtual__/@prismicio-react-virtual-943ea0185c/0/cache/@prismicio-react-npm-2.7.3-0097aeb467-0df26301c5.zip/node_modules/@prismicio/react/dist/PrismicImage.d.ts:553:26 - error TS2307: Cannot find module 'imgix-url-builder' or its corresponding type declarations.

553         txtfont?: import("imgix-url-builder").Font | null | undefined;

Steps to reproduce

I haven't tested with a fresh test project but it seems obvious that if you're using a package it should be listed as a dependency.

What is expected?

What is actually happening?

Throws the TS error above. This is resolvable by adding the following to yarnrc but this shouldn't be necessary.

packageExtensions:
  "@prismicio/react@*":
    dependencies:
      imgix-url-builder: "*"
@WCByrne WCByrne added the bug Something isn't working label Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant