Skip to content

psc: "psa" does not work with Yarn PnP #141

@elliotdavies

Description

@elliotdavies

In the new version of Yarn the module resolution has changed by default to a bespoke system called PnP. When using PnP it's no longer possible to implicitly rely on dependencies (i.e. without specifying them in package.json).

The upshot is that with PnP enabled, setting psc: "psa" in this loader doesn't work: it throws the spawn psa NOENT error that you usually see if purescript-psa isn't installed. I think this is because, even if the consuming project installs purescript-psa, purs-loader is still implicitly depending on that module existing.

A possible resolution (I'd need to test it) would be to list purescript-psa as either a dependency or peer dependency of this package.

(Side note: I assume the same issue would occur with psa: "purs", and I assume the same fix - adding purescript as a peer dependency - would sort it out.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions