Cannot find module '/usr/src/app/lib/plugins/gitlab-exporter'

Default Perfomance job fails

I’m using http://gitlab.com and getting this error

Stracktrace:

Google Chrome 89.0.4389.82 
Mozilla Firefox 86.0
Microsoft Edge 89.0.774.14 dev
[2021-03-30 11:24:01] INFO: Versions OS: linux 4.19.121-linuxkit nodejs: v14.16.0 sitespeed.io: 16.10.3 browsertime: 11.6.3 coach: 6.1.0
Couldn't load plugin ./gitlab-exporter: Error: Cannot find module '/usr/src/app/lib/plugins/gitlab-exporter'
Require stack:
- /usr/src/app/lib/core/pluginLoader.js
- /usr/src/app/lib/sitespeed.js
- /usr/src/app/bin/sitespeed.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.loadPlugins (/usr/src/app/lib/core/pluginLoader.js:53:24)
    at Object.run (/usr/src/app/lib/sitespeed.js:116:41)
    at async run (/usr/src/app/bin/sitespeed.js:13:20) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [Array]
}

One thing I changed it’s SITESPEED_VERSION: 16.10.3. That won’t help. I tried also default version of sitespeed, and it fails too.

I had the same problem.

Do you have in the Gitlab-Runner-Settings (config.toml)?
This settings:
volumes = [ “/var/run/docker.sock:/var/run/docker.sock”]
I removed it then it works.

Thank you! After your fix, I’m able to start a performance test. But now it fails with
ERROR: TypeError: Cannot read property ‘first-contentful-paint’ of undefined
at Object.processMessage (/sitespeed.io/gitlab-exporter/index.js:71:64)
at /usr/src/app/lib/core/queueHandler.js:211:32
at drainItem (/usr/src/app/node_modules/concurrent-queue/index.js:96:21)
at Immediate.drain [as _onImmediate] (/usr/src/app/node_modules/concurrent-queue/index.js:77:84)
at processImmediate (internal/timers.js:456:21)

I don’t have Problems with the following configuration. You need only to change the URL:

default:
  tags:
    - docker

stages:
  - performance

include:
  - template: Jobs/Browser-Performance-Testing.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Jobs/Browser-Performance-Testing.gitlab-ci.yml

performance:
  variables:
    CI_KUBERNETES_ACTIVE: "blabla"
    URL: "https://gitlab.com/"
  before_script:
    - echo $URL > environment_url.txt