MBed terminates on start [Cannot find module 'eventemitter2']

Running on a 64 bit linux system.
Running through console spits these errors.

Error: Cannot find module 'eventemitter2'
Require stack:
- /tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/usb-detection/index.js
- /tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@mbed/mbs-target-mgmt/lib/backend-electron/device-manager.js
- /tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@mbed/mbs-target-mgmt/lib/backend-electron/electron-device-service.js
- /tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@mbed/mbs-target-mgmt/lib/backend-electron/index.js
- /tmp/.mount_mbed-sx8TqgN/resources/app/src-gen/backend/server.js
- /tmp/.mount_mbed-sx8TqgN/resources/app/src-gen/backend/main.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:17)
    at Module._load (internal/modules/cjs/loader.js:690:27)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/usb-detection/index.js:14:22)
    at Module._compile (internal/modules/cjs/loader.js:967:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/usb-detection/index.js',
    '/tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@mbed/mbs-target-mgmt/lib/backend-electron/device-manager.js',
    '/tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@mbed/mbs-target-mgmt/lib/backend-electron/electron-device-service.js',
    '/tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@mbed/mbs-target-mgmt/lib/backend-electron/index.js',
    '/tmp/.mount_mbed-sx8TqgN/resources/app/src-gen/backend/server.js',
    '/tmp/.mount_mbed-sx8TqgN/resources/app/src-gen/backend/main.js'
  ]
}
(node:8187) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
/tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@theia/core/lib/node/main.js:58
    throw reason;
    ^

Error: Cannot find module 'eventemitter2'
Require stack:
- /tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/usb-detection/index.js
- /tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@mbed/mbs-target-mgmt/lib/backend-electron/device-manager.js
- /tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@mbed/mbs-target-mgmt/lib/backend-electron/electron-device-service.js
- /tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@mbed/mbs-target-mgmt/lib/backend-electron/index.js
- /tmp/.mount_mbed-sx8TqgN/resources/app/src-gen/backend/server.js
- /tmp/.mount_mbed-sx8TqgN/resources/app/src-gen/backend/main.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:17)
    at Module._load (internal/modules/cjs/loader.js:690:27)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/usb-detection/index.js:14:22)
    at Module._compile (internal/modules/cjs/loader.js:967:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/usb-detection/index.js',
    '/tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@mbed/mbs-target-mgmt/lib/backend-electron/device-manager.js',
    '/tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@mbed/mbs-target-mgmt/lib/backend-electron/electron-device-service.js',
    '/tmp/.mount_mbed-sx8TqgN/resources/app/node_modules/@mbed/mbs-target-mgmt/lib/backend-electron/index.js',
    '/tmp/.mount_mbed-sx8TqgN/resources/app/src-gen/backend/server.js',
    '/tmp/.mount_mbed-sx8TqgN/resources/app/src-gen/backend/main.js'
  ]
}

Attempted fix was
npm install eventemitter2
Results unchanged.

Hi @Rory_Finnegan, looks you might have a corrupt install. Can you give a few more details on your setup please?

  • Which distro are you using?
  • How did you install Mbed Studio?

Thanks!

Pop!_OS 22.04 LTS x86_64
Installed through the script on the homepage “Download on Linux.”

A tentative solution is to switch my machine back to integrated graphics mode.
This is a laptop with the following GPUs

GPU: Intel TigerLake-H GT1 [UHD Graphics] 
GPU: NVIDIA GeForce RTX 3050 Ti Mobile

In order to launch while still using my dedicated GPU I have found a workaround by launching the program in console with the flag --in-process-gpu