vue-demi isn't packed correctly by webpack, leading to pinia failing

Hi, I self compile GitLab for packaging in NixOS. While packaging the update 17.8.2 -> 17.9.1, I encountered an issue that GitLab has a broken merge request page:

screenshot-2025-03-03_12-03-1741000226

The errors logged are: (error traces seperated by empty lines)

Uncaught TypeError: Object(...) is not a function
    u pinia.mjs:1732
    vs init.js:54
    ws init_mr_notes.js:16
    fr page.js:24
    g7k4 index.js:4
    Webpack 6
pinia.mjs:1732:27
    u pinia.mjs:1732
    vs init.js:54
    ws init_mr_notes.js:16
    fr page.js:24
    g7k4 index.js:4
    Webpack 6
        r
        255
        r
        c
        a
        <anonymous>


TypeError: id must be a number or string; got undefined
    f utils.js:75
    issuableId sticky_header.vue:109
    VueJS 3
    skip sticky_header.vue:45
    _skipWatcher vue-apollo.esm.js:524
    VueJS 3
    value vue-apollo.esm.js:523
    value vue-apollo.esm.js:1452
    W vue-apollo.esm.js:2038
    VueJS 17
    KSqo page.js:78
    requestIdleCallback handler*KSqo page.js:47
    Webpack 8
vue.runtime.esm.js:3065:16

I use

  • NodeJS 20.18.3
  • Yarn 1.22.2
  • Ruby 3.2.6 or 3.3.6

I checked that the node_modules folder contains the correct versions for vue-demi and pinia. I just execute bundle exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production SKIP_YARN_INSTALL=true (Yarn install happens before).

My browser only shows me vue-demi/lib/index.cjs, but not the mjs and especially not files in the v2.7 subfolder. I'm not 100% sure that webpack packing is the issue, but I don't have a better idea.

screenshot-2025-03-03_12-03-1741000493

The GitLab backend doesn't log any warnings or errors. Also in the webpack log, I see no mention of either pinia nor vue-demi. Maybe you have an idea.