Skip to content

Conversation

@rambip
Copy link
Contributor

@rambip rambip commented Oct 7, 2025

🎩 Description

graphql-ws

This pull request add a constraint to the graphql-ws dependency. Without it, the app can't be installed.
This change is needed since graphql-ws version 6.0.0 was released, 9 months ago.

Version 6.0 and above now requires node engine version superior to 20, which is not the case in this repo (v18).

markdown-it

With the current state of this repository, I was not able to run bundle exec rake assets:precompile

I included a downgrade of the markdown-it library to be able to run the app.

Testing

N/A
With this change, I was able to install the app, and I checked that the version matched with other member of the team.

I don't know if the file is used by docker, maybe I should check that ?

📌 Related Issues

Fixes #898
Fixes #900

Tasks

N/A

📷 Screenshots

N/A

Extra information

@rambip rambip changed the title add constrain for graphql-ws dependency Fix node versions Oct 7, 2025
Copy link
Contributor

@Stef-Rousset Stef-Rousset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @rambip , the locked version for graphql-ws seems ok.
For markdown-it, the 14.1.0 version is used in different packages, as you can see below (from my local decidim-app)
decidim-lite@0.1.0 /Users/stephanierousset/code/opensourcepolitics/decidim-app
├─┬ @decidim/core@0.29.4 -> ./packages/core
│ ├─┬ @tiptap/pm@2.1.13
│ │ └─┬ prosemirror-markdown@1.13.2
│ │ └── markdown-it@14.1.0
│ └─┬ graphiql@3.9.0
│ └─┬ @graphiql/react@0.29.0
│ └── markdown-it@14.1.0 deduped
└─┬ @decidim/dev@npm:dev@0.29.4 -> ./packages/dev
└─┬ markdownlint-cli@0.35.0
└─┬ markdownlint@0.29.0
└── markdown-it@13.0.1
Also, I investigate further on the error you encountered with markdown-it (the log you put on Element), and it seems to be linked to uc-micro version. May be you could update uc-micro package (my version is 2.1.0) and try again with the 14.1.0 version of markdown-it ?

@rambip
Copy link
Contributor Author

rambip commented Oct 8, 2025

Ok, I think found the culprit(s).

The problem is that in this current configuration, I get 2 different incompatible uc.micro dependencies. It is a dependency of markdown-it, which is used multiple times in this project. markdown-it version 14.1.0 uses uc.micro v2, and markdown-it version 13.0.1 uses v1
I traced back the problem, and markdown-it is required by 3 different packages:

decidim-lite@0.1.0 /Users/antoninp/Documents/decidim-app
├─┬ @decidim/core@0.29.3 invalid: "file:packages/core" from the root project (packages/core)
│ ├─┬ @tiptap/pm@2.1.13
│ │ └─┬ prosemirror-markdown@1.13.2
│ │   └── markdown-it@14.1.0
│ └─┬ graphiql@3.9.0
│   └─┬ @graphiql/react@0.29.0
│     └── markdown-it@14.1.0
├─┬ @decidim/dev@0.29.5
│ └─┬ markdownlint-cli@0.35.0
│   └─┬ markdownlint@0.29.0
│     └── markdown-it@13.0.1 deduped
└── markdown-it@13.0.1

One dependant is decidim/dev.
The other 2 are specific to decide-app: graphiql and tiptap.

There is a version mismatch: graphiql an tiptap use a version of markdown-it that is too recent !
If you look at decidim/app v29.3, you see that it uses "markdownlint-cli": "^0.35.0", which in turn uses markdown-it v13.

My original fix was correct. It may be better to downgrade graphiql and tiptap though.

@rambip rambip force-pushed the graphql-ws-version branch from 26f9555 to 9fd3f66 Compare October 8, 2025 10:57
@Stef-Rousset
Copy link
Contributor

Hello @rambip , moustachu has spotted that your version of decidim was 0.29.3 (@decidim/core@0.29.3), while mine is 0.29.4. May be it can explain why I don't experience your problem. Now develop is on 0.29.5. Could you try to update your branch to latest develop commit and see if you still have the same problem 🙏 ?

@rambip
Copy link
Contributor Author

rambip commented Oct 14, 2025

No, it does not.
I just took the latest develop branch, and same errors. Here are the new versions:

decidim-lite@0.1.0 /Users/antoninp/Documents/decidim-app
├─┬ @decidim/core@0.29.3 invalid: "file:packages/core" from the root project (packages/core)
│ ├─┬ @tiptap/pm@2.1.13
│ │ └─┬ prosemirror-markdown@1.13.2
│ │   └── markdown-it@14.1.0
│ └─┬ graphiql@3.9.0
│   └─┬ @graphiql/react@0.29.0
│     └── markdown-it@14.1.0 deduped
└─┬ @decidim/dev@0.29.5
  └─┬ markdownlint-cli@0.35.0
    └─┬ markdownlint@0.29.0
      └── markdown-it@13.0.1

I also checked that the 0.29.5 of decidim core used the old markdown-lint cli, and it it the case (see here )

I don't know exactly why we don't get the same error, but probably because we don't have the same yarn.lock file. If you remove it and redo yarn install, I bet you will have issues to.

@rambip
Copy link
Contributor Author

rambip commented Oct 27, 2025

PR #862 changed the recommended node version from 18 to 22, that might be enough to fix this issue. Since the docker image build without error, I think we can close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webpack error with markdown-it and ucmicro node-version is incompatible with graphql-ws

2 participants