Reputation: 2712
I am getting the following error in the auto-start(Run entry in Regedit to Auto-Start) App after restarting the app or stop auto-start and started manually then its working file.
Error
No native build was found for platform=win 32
loaded from: C:\WINDOWS\System32\node_modules\ffi-napi\node_modules\ref-napi.
Here actual prebuild path is installation dir ie %APPDATA%/appname/node_modules
but first time its taking C:\WINDOWS\System32\node_modules
.
I compared both processes I only found the difference is "NativeModule internal/fs/read_file_context"
is missing.
Added prebuilt as follows in electron app.
extraFiles: [
'./node_modules/ffi-napi/prebuilds/**/*',
'./node_modules/ffi-napi/node_modules/ref-napi/prebuilds/**/*',
'./node_modules/ref-napi/prebuilds/**/*',
...
]
I really don't know what is going wrong for the first time. Please help. Thanks in advance :)
Upvotes: 0
Views: 3118
Reputation: 2712
After debugging the Exe application I found extrafiles prebuilt fail sometimes to access relative path. hence I used webpabck-externals
externals = [
'ffi-napi':"require('ffi-napi')"
]
Upvotes: 2