Issues building Cristal locally

Dear Cristal Team,

I hope it is the right place to file an issue (as i am not allowed to create an issue in Jira).
Following the steps to run Cristal locally, currently there is a build error with a sub-sub dependency (tiptap/extension-horizontal-rule).

my workaround is adding these lines to package.json to force using these versions:

“overrides”: {
@tiptap/core”: “^2.26.2”,
@tiptap/extension-horizontal-rule”: “^2.26.2”
}

do you have a better fix?

Hi,

Building and running the latest commit in a clean environment, I could not reproduce your issue.

It is a bit weird that your fix requires allowing these package versions, since we should still be using version 2.13.0 of tiptap. I had some issues with a custom deployment in the past where I had to explicitly fix some dependencies of tiptap extensions to version 2.13.0, and you might have something similar here (but this was with regular npm and I could not reproduce it with the Cristal repository itself, are you using the right version of pnpm?)

Now, tiptap should be deprecated in the next release in favor of blocknote (see Loading... ), so this should not come up anymore. In the meantime, you could either keep your patch (if it works for you), or try to apply the current open PR ( CRISTAL-639: Remove TipTap editor by ClementEXWiki · Pull Request #1243 · xwiki-contrib/cristal · GitHub ) even though it might not be final.

Hope it helps!

1 Like

thanks for replying. i just tried again (without any changes) and suddenly i could build without any issues.

the original error is this one:

Screenshot 2025-09-25 at 20.47.31

oh, i would like to ask you to run after install “pnpm start” or “pnpm run dev:cristal-web”. I am getting the error again:

Hello @mui !

I tried on my side, with the steps below, and the last command (pnpm run start) worked as expected.

cd /tmp
git clone git@github.com:xwiki-contrib/cristal.git
cd cristal
pnpm i
pnpm run build
pnpm run start

I used pnpm 10.17.1 and node v22.20.0 (current lts). Can you confirm you are using the same versions and followed the same steps?

thanks for going through those steps. Those helped identifying the real issue:

It is on my setting, because my global (home directory) .npmrc contained lockfile=false which ofc ignored the pinned versions and therefore this error occurred.

now everything works fine!

PS: in case someone runs into the same issue, add lockfile=true in the workspace’s .npmrc to explicitly set it in the project and override the global setting.

2 Likes

Thanks! I won’t add an .npmrc on cristal for now. But, I’ll keep that in mind if this issue gets reported again.

@mui out of curiosity, what brought you to set lockfile=false globally?

TLDR;
The main reason is to overcome questions like “when is the right time to update something”.

we are using Angular for our frontend apps and in recent years there were huge changes, which caused fairly old codebases to be refactored in a bigger manner (that is time consuming). That lead to the decision to be always up to date with all dependencies and tackle breaking changes as soon as they occur.

There are some aspects which makes this work for us:

  • small dependency footprints (we spend a lot of time evaluating packages before integrating them)
  • just a couple of developers consuming those repositories
  • updating deps and adjusting code to make them work is first priority to us :slight_smile:

does that make sense to you?

PS: Sorry for the confusion in my previous post, I was not meant to ask you to add a .npmrc, but for a person which has the same issue (probably rare case).

Definitely :slight_smile:
We solved the issue by using renovate (Mend Renovate Enterprise Edition), leading to a lot of pull requests that we have to handle. But overall that allows us to stay up to date while having control over what is upgraded and when.

1 Like

same, we use renovate too :smiley: