Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
seltzered opened this issue Mar 29, 2024 · 2 comments

Comments

@seltzered
Copy link

Bug Description:

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

Steps to Reproduce:

  • cd into theia-blueprint folder
  • ensure nothing else is in the repo - run git reset --hard master and yarn clean
  • run yarn && yarn build && yarn download:plugins
  • run yarn electron package:preview
  • run ./applications/electron/dist/linux-unpacked/theia-ide-electron-app

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:

  • Operating System: Linux (fedora 39), global node installed via nvm at 20.10.0
  • Theia Version: 4682fb9 build, so Theia 1.47.1
@seltzered
Copy link
Author

Also bumping into the same build issue with Theia-bluprint tagged at Theia 1.44.0 ( 81553f9 ), so perhaps it's something more to do with my environment.

@seltzered
Copy link
Author

seltzered commented Sep 21, 2024

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 eclipse-theia/theia#13126 (comment) ), 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 eclipse-theia/theia#9508 (comment) , which'll clean out node_modules akin to the advice in eclipse-theia/theia#13126 (comment) . Notably, this was also added to the Jenkinsfile in bf31e6c .

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.

seltzered added a commit to seltzered/theia-blueprint that referenced this issue Sep 21, 2024
…y changes/pulling to a new commit

Proposing a note in the readme for those doing manual builds to run `git clean -xfd` when updating to a newer commit of the repo, particularly when updating dependencies. 

The jenkinsfile already does this, see eclipse-theia#349 (comment) for more info. As a casual hobbyist developer who comes back to working on Theia intermittently this issue has come back to frustrate me for a while and seems to have come up in other conversations. There may be some better ways to handle this but the `git clean -xfd` approach has seemingly been more reliable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant