Skip to content

Unable to install with rush/pnpm due to upstream dependency bug #905

Closed
@robbieaverill

Description

@robbieaverill

Describe the bug

When I try to install this package into a Docusaurus site that uses rush/pnpm as the package manager, I am unable to.

This is causes by an upstream bug in postman-code-generators: postmanlabs/postman-code-generators#760. I'm raising it here in case others are experiencing the same issue, but also in case there's a solution to avoid the issue in this package.

I don't actually want any generated code examples at all. It's a shame that I can't use this package without them.

Expected behavior

I should be able to install the package.

Current behavior

$ pnpm install

...
node_modules/.pnpm/postman-code-generators@1.12.0/node_modules/postman-code-generators: Running postinstanode_modules/.pnpm/postman-code-generators@1.12.0/node_modules/postman-code-generators: Running postinstall script, failed in 920ms
.../node_modules/postman-code-generators postinstall$ node npm/deepinstall.js
│ Detected package manager: pnpm
│ Running pre-package script
│ Run successful languages.js saved in lib/assets
│ csharp-httpclient: pnpm install --no-audit --production
│ Failed to run pnpm install on codegen csharp-httpclient, here is the error:
│ csharp-restsharp: pnpm install --no-audit --production
│ Failed to run pnpm install on codegen csharp-restsharp, here is the error:
│ .../common/temp/node_modules/.pnpm/async@3.2.2/node_modules/a…
│             if (fn === null) throw new Error("Callback was already called.");
│                                    ^
│ Error: Callback was already called.
│     at .../common/temp/node_modules/.pnpm/async@3.2.2/node_mo…
│     at .../common/temp/node_modules/.pnpm/async@3.2.2/node_mo…
│     at .../common/temp/node_modules/.pnpm/postman-code-genera…
│     at Array.forEach (<anonymous>)
│     at .../common/temp/node_modules/.pnpm/postman-code-genera…
│     at .../common/temp/node_modules/.pnpm/async@3.2.2/node_mo…
│     at replenish (.../common/temp/node_modules/.pnpm/async@3.…
│     at iterateeCallback (.../common/temp/node_modules/.pnpm/a…
│     at .../common/temp/node_modules/.pnpm/async@3.2.2/node_mo…
│     at .../common/temp/node_modules/.pnpm/async@3.2.2/node_mo…
│ Node.js v20.11.0
└─ Failed in 921ms at .../common/temp/node_modules/.pnpm/postman-code-generators@1.12.0/node_modules/postman-code-generators
 ELIFECYCLE  Command failed with exit code 1.

Possible solution

Make the code-generators package opt-in.

Your Environment

  • Version used: 3.0.1
  • Environment name and version: Node 20.11.0
  • Operating System and version (desktop or mobile): Mac M1

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