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

The specified module could not be found, with electron, again #1636

Closed
dhmk083 opened this issue Mar 30, 2019 · 4 comments
Closed

The specified module could not be found, with electron, again #1636

dhmk083 opened this issue Mar 30, 2019 · 4 comments
Labels

Comments

@dhmk083
Copy link

dhmk083 commented Mar 30, 2019

It seems to be unrelated to #1522.
What I have:

  • windows 8 x64
  • electron 4.1.0
  • sharp 0.22.0

I did yarn add sharp and yarn electron-rebuild and it ran successfully. But I had this error:
Error: The specified module could not be found. .... node_modules\sharp\build\Release\sharp.node

After I manually copied all *.dll files from sharp/vendor/lib folder to sharp/build/Release the error went away.

Did I miss some step in installation? Why weren't those files copied automatically?

@lovell
Copy link
Owner

lovell commented Mar 30, 2019

Precompiled binaries are not yet provided for Electron 4 - see #1522.

Please can you provide the debug/verbose output of running electron-rebuild.

@dhmk083
Copy link
Author

dhmk083 commented Mar 30, 2019

Oh, now I see. I looked more carefully at sharp/build/Release folder. When I do just yarn add sharp without rebuilding, those dlls are inside that folder, but I have an error about ABI version mismatch. And when I run electron-rebuild, it rebuilds only libvips-cpp.dll and does not copy other dlls from vendor.

I don't know about building process for node, but I think we could add a post-build event that would copy dlls into the right place to automate the process.

Btw, I didn't find verbose option for electron-rebuild (there is undocumented --log switch, but it doesn't work for me).

@lovell
Copy link
Owner

lovell commented Mar 30, 2019

The current install script copies the DLLs:

"install": "(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)",

If electron-rebuild doesn't run this then perhaps you'll need to manually do this afterwards:

node node_modules/sharp/install/dll-copy

@dhmk083
Copy link
Author

dhmk083 commented Mar 31, 2019

So, the problem may be in electron-rebuild. Ok, thanks for the explanation.

@dhmk083 dhmk083 closed this as completed Mar 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants