Skip to content

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

@WCByrne

Description

@WCByrne

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: "*"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions