newman icon indicating copy to clipboard operation
newman copied to clipboard

Missing dependency causes Yarn PNP to fail

Open TravisBernard opened this issue 2 years ago • 1 comments

Newman fails to run with Yarn >=2 in PNP mode. It issues the <name> is trying to require <name> without it being listed in its dependencies error.

  1. Newman Version (can be found via newman -v): 5.3.2
  2. OS details (type, version, and architecture): N/A
  3. Are you using Newman as a library, or via the CLI?: Yarn Installed CLI
  4. Did you encounter this recently, or has this bug always been there: Unknown
  5. Expected behaviour: Newman runs without error
  6. Command / script used to run Newman: yarn newman run ...
  7. Sample collection, and auxiliary files (minus the sensitive details): N/A
  8. Screenshots (if applicable): N/A

First you will get the error stating postman-sandbox is requiring postman-collection. I have opened PR 848 on postman-sandbox to resolve that issue.

Once the postman-sandbox issue is resolved then you will get the same error again this time stating that newman is requiring liquid-json. This is the issue I am creating this ticket for.

I have a proposed fix. I will reference this issue in the pull request.

TravisBernard avatar Aug 04 '22 04:08 TravisBernard

@TravisBernard merged the fix. I will publish the package with the fix soon!

codenirvana avatar Aug 04 '22 04:08 codenirvana

We are running into the same issue with pnpm which also requires accurate dependency information. The root fixes are merged:

  • https://github.com/postmanlabs/postman-sandbox/pull/849
  • #3001

But the there is no newman release that contains these fixes :(

Note that postman-sandbox is a transitive dependency, so I'm not sure whether any of the packages in-between on the dependency chain need to be adjusted as well.

Toxaris avatar Dec 15 '22 13:12 Toxaris