-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 v4.0.0. #1522
Comments
The You'll probably want to use electron-rebuild. |
electron-rebuild is what I am currently using with Electron 3, but it fails with Electron 4. From what I understand the version is for electron since |
Is this on Windows? If so, try pointing Dependency Walker at the |
sharp.zip |
Thanks, according to that I'd imagine other native modules are going to fail in a similar manner - |
https://electronjs.org/docs/tutorial/using-native-node-modules#troubleshooting |
Thank you, but I still don't understand how to make things right, or maybe I should just wait for electron-rebuild to release some update? |
Please can someone confirm that this problem is limited to Windows only. Is anyone able to produce a minimal repo that exhibits the problem? |
I have placed a very simple repo which exhibits the problem here https://github.com/groboter/sharpErrorTestApp. I hope it is ok, because it is my first one! Basically it is just the Quick-Start-App from https://github.com/electron/electron-quick-start and I just added line 3 |
The version of Node in Electron 3 does not appear to maintain ABI compatibility with the version in Electron 4 despite both claiming to provide ABI version 64. When you run You can hack your way around this by removing npm install
rm -rf node_modules/prebuild-install
./node_modules/.bin/electron-rebuild In summary, Electron needs to sort out its ABI versioning. |
Here's confirmation of the Electron 3 vs 4 ABI incompatibility - electron/node-abi#55 (comment) - this will impact all native modules that provide prebuilt binaries for Electron. |
@lovell Thank you for clarification and for such an awesome library in general. |
electron/electron#16687 Am I correct that this should fix the issue?
This is probably an electron-builder issue and not a sharp one. |
Electron 4.1.0 seems to have solved this issue, is it?
|
I tried just Electron v4.1.0, but in my case it did not help. Gonna have to wait for sharp update. |
@tomaschyly: Did you clean your build machine? I had to not only delete my project's node_modules, but
(I added it as postinstall script) |
Yes I did try to clean everything, but it seems that I will have to wait for update like I have been told here #1608 |
The ABI version of 69 used by Electron 4 is (correctly) considered "oddball" by the prebuild infrastructure so this is still blocked until the approach proposed in prebuild/prebuild-ci#11 is addressed. |
What is the workaround for this? Using Electron 3? |
Yes, I have rolled back to Electron 3.1.6(The last version of 3.x.x) |
@JakeRadMSFT |
I think everything already works with Electron 4.1. I originally run into this same issue, but then I realized that I'm having unrelated issues with 0.22 / libvips 8.7.4 on Ubuntu Xenial (because of older versions of librsvg or cairo, not sure yet) but on newer Linux systems I had that combination working as well. |
Fixed my issue on Mac (Mac works with Electron 4.1). See #1519 One windows, I still get "Error: The specified module could not be found". Now trying a downgrade to 3.1.6. Update: Doesn't work with 3.1.6. Perhaps I'm hitting some other issue? |
Sigh ... it's because of this: mapbox/node-pre-gyp#278 soon to be fixed: mapbox/node-pre-gyp#279 |
Should anyone want to speed all this along, the best thing to do would be to work on prebuild/prebuild-ci#11 and ensure ABI version 69 is added to the "oddball" list. Without this a prebuilt sharp will not be available for Electron 4 / ABI 69. |
That's actually not the issue anymore ... I think it works against 4. I'll open a new bug ... |
Encountered a similar issue with Posted an MVP at electron/electron-quick-start#269. |
I've opened a PR to help ensure prebuilt binaries for the latest Electron 4 / ABI 69 will soon be available - see prebuild/prebuild-ci#16 |
v0.22.1 now available with prebuilt binaries for Electron 4 and 5. Please remember to run |
This issue occur on electron 6.0.1.
|
With electron 3.0.12 everything seems to work fine.
Changed version to 4.0.0, removed node_modules, did
npm i
, all ok.If I run electron-rebuild, the command runs, but it does not rebuild the sharp module, does not seem it's picking it up.
If I run
require('sharp')
I get:The specified module could not be found
If I cd to node_modules/sharp and try to recompile it manually:
node-gyp rebuild --target=4.0.0 --arch=x64 --dist-url=https://atom.io/download/electron
and try
require('sharp')
I still getThe specified module could not be found
.Note: I have checked and
sharp.node
is present at the specified path.The text was updated successfully, but these errors were encountered: