-
Notifications
You must be signed in to change notification settings - Fork 248
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
Unable to install with rush/pnpm due to upstream dependency bug #905
Comments
Workaround till they fix this: "resolutions": {
"postman-code-generators": "1.10.1"
}, |
Thanks @lpicchi. I have 1.12.0 installed - is a downgrade necessary? |
I encountered a problem with sidebar generation while working on: - #406 Upgrading the package fixed it. However, there is an issue with the latest version of the package: PaloAltoNetworks/docusaurus-openapi-docs#905, which is why I pinned the version of `postman-code-generators` Ticket Link: #406 <!-- See https://www.notion.so/immersve/Pull-Request-Checklist-72c856d319e24396aa82179e8894face (delete this comment before creating PR) -->
@robbieaverill I don't have any knowledge on rush.js but according to their docs it supports a "globalOverrides" config. You should use it to set the package to the mentioned "safe" version. |
Using version 1.10.1 will not work entirely for Rush/pnpm users, because prior to 1.11.0 postman-code-generators was not using your package manager when performing deep installs. See postmanlabs/postman-code-generators#744. It might work for users without NPM registry authorization, or those using npm directly. |
I'm sorry to hear that... it seems there is no workaround for your use case then |
After trying again, I can confirm that 1.10.1 installs locally without this error. Unfortunately, another issue presents. The dependency's deep-install process tries to install using the wrong package manager, which doesn't share the same auth as my Rush setup. This was fixed in postmanlabs/postman-code-generators#744, but the combination of both bugs still makes this dependency unusable in this context. |
In case it is useful to anyone, when using Rush and finding build errors due to NPM repository authorization issues in CI (when deep installing postman-code-generators), I did the following as a workaround:
Swizzled file: // File: src/theme/ApiExplorer/index.jsx
import React from 'react';
import Request from '@theme/ApiExplorer/Request';
import Response from '@theme/ApiExplorer/Response';
export default ({ item }) => (
<>
<Request item={item} />
<Response item={item} />
</>
); Note that I had a hard time getting TypeScript configuration to appreciate this new file. I raised an issue for that as #920 and proceeded to swizzle it as a JavaScript file instead. Edit: after doing this, I ran into another problem: #920. I've ended up forking the theme. |
This should be fixed by updating |
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
Possible solution
Make the code-generators package opt-in.
Your Environment
The text was updated successfully, but these errors were encountered: