eclipse-theia / theia-ide

The Eclipse IDE is a modern and open IDE for cloud and desktop. The Theia IDE is based on the Theia platform. The Theia IDE is available as a downloadable desktop application. You can also try the latest version of the Theia IDE online. For more details, see the Readme below.
https://theia-ide.org/#theiaide
MIT License
360 stars 133 forks source link

Error module did not self-register ( drivelist.node ) while starting electron app #349

Open seltzered opened 8 months ago

seltzered commented 8 months ago

Bug Description:

Repeating the issue I've also left a comment on in https://github.com/eclipse-theia/theia/issues/13126 , where I'm noticing I can't seem to build theia-blueprint (commit https://github.com/eclipse-theia/theia-blueprint/commit/4682fb920d42db913b630faa36d35449ba0657d8 ) in my current environment and end up with this error:

Steps to Reproduce:

end up with the following error:

Error: node-loader:
Error: Module did not self-register: '/home/myPathTo/theia-blueprint/applications/electron/dist/linux-unpacked/resources/app/lib/backend/native/drivelist.node'.
    at 26747 (/home/myPathTo/theia-blueprint/applications/electron/dist/linux-unpacked/resources/app/lib/backend/849.js:2:166)
    at o (/home/myPathTo/theia-blueprint/applications/electron/dist/linux-unpacked/resources/app/lib/backend/main.js:1:12188)
    at e.exports (/home/myPathTo/theia-blueprint/applications/electron/dist/linux-unpacked/resources/app/lib/backend/main.js:1:2880)
    at 59135 (/home/myPathTo/theia-blueprint/applications/electron/dist/linux-unpacked/resources/app/lib/backend/849.js:2:555008)
    at o (/home/myPathTo/theia-blueprint/applications/electron/dist/linux-unpacked/resources/app/lib/backend/main.js:1:12188)
    at 80934 (/home/myPathTo/theia-blueprint/applications/electron/dist/linux-unpacked/resources/app/lib/backend/849.js:2:53480)
    at o (/home/myPathTo/theia-blueprint/applications/electron/dist/linux-unpacked/resources/app/lib/backend/main.js:1:12188)
    at 33299 (/home/myPathTo/theia-blueprint/applications/electron/dist/linux-unpacked/resources/app/lib/backend/849.js:2:55250)
    at o (/home/myPathTo/theia-blueprint/applications/electron/dist/linux-unpacked/resources/app/lib/backend/main.js:1:12188)
    at 42737 (/home/myPathTo/theia-blueprint/applications/electron/dist/linux-unpacked/resources/app/lib/backend/849.js:2:48212)

Node.js v18.12.1
theia-ide-electron-app [file]

Environment:

seltzered commented 8 months ago

Also bumping into the same build issue with Theia-bluprint tagged at Theia 1.44.0 ( https://github.com/eclipse-theia/theia-blueprint/commit/81553f97f754fb49aa8464db4ac66ad1438ce069 ), so perhaps it's something more to do with my environment.

seltzered commented 2 months ago

I was still experiencing this issue months later with the latest theia-blueprint, where doing a what should be an updated checkout (with git reset --hard) would still lead to this issue. I also tried changing the cacheRoot directory location to ./applications (suggested in https://github.com/eclipse-theia/theia/issues/13126#issuecomment-2015938286 ), but can't tell if that improved anything and reverted cacheroot back to the pwd (.).

Somehow what seemed to work (and I'm still confused as to why) was trying git clean -xfd per the advice in https://github.com/eclipse-theia/theia/issues/9508#issuecomment-915908079 , which'll clean out node_modules akin to the advice in https://github.com/eclipse-theia/theia/issues/13126#issuecomment-1839306133 . Notably, this was also added to the Jenkinsfile in https://github.com/eclipse-theia/theia-blueprint/commit/bf31e6c3659c3672bd7b0494b1a827f00a6933d1 .

All this said, is there perhaps some guidance that could be added into the Readme to help those encountering this issue? Particularly for those just getting started and not doing automated builds? I've been bumping into it intermittently for a couple years.