Hi, this node can use in Electron?
cqmonly opened this issue · 4 comments
cqmonly commented
I want to use [v8-profiler-next] in my electron project, I use npm i v8-profiler-next --build-from-sourc
install.
When I start my electron application, but get error:
Error: Module did not self-register
What do I need to do?
Electron Version: 11.4.1
Node Version: v14.19.0
System: Windows 10 x64
Thanks for your help~
Hope to get your advice :)
hyj1991 commented
Since Electron has a different application binary interface (ABI), so you should compile it like:
npm install --save-dev electron-rebuild
# Every time you run "npm install", run this:
./node_modules/.bin/electron-rebuild
# If you have trouble on Windows, try:
.\node_modules\.bin\electron-rebuild.cmd
Reference: https://www.electronjs.org/zh/docs/latest/tutorial/using-native-node-modules
cqmonly commented
thanks, I'll try it
hyj1991 commented
Hello, is there any progress?
amilajack commented
I've confirmed this works