Skip to content
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

Host contributing instructions fail on patchedDependencies #6179

Open
TomasHubelbauer opened this issue Jan 10, 2025 · 0 comments
Open

Host contributing instructions fail on patchedDependencies #6179

TomasHubelbauer opened this issue Jan 10, 2025 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@TomasHubelbauer
Copy link
Contributor

Description

Hi, I followed the host contributing instructions here:
https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/docs/community/contributing.md

It boils down to these steps:

  • Install PNPM curl -fsSL https://get.pnpm.io/install.sh | sh -
  • Configure Node 20 to be the default Node version to use pnpm env use --global 20
  • Install the package dependencies pnpm install
  • Run the test suite to verify everything worked pnpm test

When running the pnpm install step it would end on this error:

#  ERR_PNPM_PATCH_NOT_APPLIED  The following patches were not applied: roughjs
# Either remove them from "patchedDependencies" or update them to match packages in your dependencies.

Ignoring it, pnpm test would fail on:

# sh: vitest: command not found
# Local package.json exists, but node_modules missing, did you mean to install?

I noodled around for a bit and then just tried removing the patchedDependencies section from package.json:

{
  "pnpm": {
    "patchedDependencies": {
      "roughjs": "patches/roughjs.patch"
    }
  }
}

After, pnpm install went through successfully and so did pnpm test passing the entire 3k strong test suite.

This indicates that the roughjs patch is not needed for the tests, but I assume it is there for a reason.
All I know at this point is that it prevents pnpm install from working in the host development setup.

Steps to reproduce

Follow the host contributing guides and come across the problem I described above - or not which could indicate a problem on my end which I find unlikely given the nature of the error message and the workaround that worked for me.

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version: develop branch
  • Browser and Version: N/A

Suggested Solutions

Remove the patchedDependencies if obsolete and safe to remove.

Additional Context

No response

@TomasHubelbauer TomasHubelbauer added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant