prebuildify: The specified module could not be found

I’m attempting to upgrade my app from Electron v3 to v7. macOS and Linux works fine, but I’m getting the following errors on Windows:

32-bit:

Uncaught Error: The specified module could not be found.
\\?\C:\Program Files\Tidepool Uploader\resources\app.asar.unpacked\node_modules\lzo-decompress\prebuilds\win32-ia32\electron.napi.node

64-bit:

Uncaught Error: The specified module could not be found.
\\?\C:\Program Files\Tidepool Uploader\resources\app.asar.unpacked\node_modules\lzo-decompress\prebuilds\win32-x64\electron.napi.node

I’ve found some threads relating to that error appearing when some .dll’s cannot be found. I’m still using the same .dll’s that worked under Electron v3, so I thought it may be due to https://electronjs.org/docs/tutorial/using-native-node-modules#a-note-about-win_delay_load_hook, but my understanding is that win_delay_load_hook is handled by node-gyp-build?

The module’s source code can be found here: https://github.com/tidepool-org/lzo-decompress/tree/update-deps

Notes:

  • I’ve updated to the latest versions of prebuildify, node-gyp-build and napi-macros.
  • I’m using prebuildify --napi and prebuildify --arch=ia32 --napi to generate the prebuilds
  • Obviously the .node files in question are actually there

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

I was thinking maybe just another footnote in the options table, next to the --napi flag. As in, “***** Using prebuildify --napi will only support Electron v3 if not targeting a specific Electron or Node version. Use prebuildify -t 8.14.0 --napi to produce a runtime-agnostic prebuild that works in both Node v8 (and higher) and Electron v4 (and higher).”

Breaking the footnotes into a FAQ/Caveats section could also work.

I remember that leveldown had issues with electron v3 and we ended up requiring a minimum of electron v4, and it was related to the delayed load hook mess. Lemme see if I can find it in GH history.

Yeah, I think it defaults to true, so that line is just to make sure that you don’t manually set it to false (for whatever reason).