hyj1991/v8-profiler-next

Hi, this node can use in Electron?

cqmonly opened this issue · 4 comments

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 :)

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

thanks, I'll try it

Hello, is there any progress?

I've confirmed this works