-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
local dependencies (file:path instead of version) are not included in app.asar #8401
Comments
I wrote a small demo myself and couldn't reproduce the issue you mentioned. Could you provide a demo code that reproduces the problem? |
I reproduced this issue in https://github.com/flexopticalHenno/issue-repro-electron-builder-local-dependency |
I'm sorry for the inconvenience caused. This is caused by develar/app-builder#120. When npm installs local dependencies, it creates a system link. Currently, app-builder converts these system links into real paths, which causes the It seems we can't revert develar/app-builder#120 as it would cause other issues. There are three solutions:
@mmaietta Do you have any suggestions or comments? |
Thank you for the quick response and help. I believe that the third option will be working fine in my setup |
Interestingly enough, when I try to reproduce this in your demo with |
This should be a bug, which will be fixed in this #8406. Once fixed, you should not encounter any more issues if you directly place it in the libs directory. |
When packing the app with electron-builder, a local dependency (version is
file:path/to/lib
) is not included inapp.asar/node_modules
. This was working with electron-builder 24.13.3When installing the local dependency, npm creates a symbolic link in the
node_modules
folder that points to the source of the dependency on the local file system. Electron-builder 24.13.3 created a copy of that folder inapp.asar
, but with electron-builder 25 it is missing. Starting the app will show an error dialog stating "Uncaught Exception: Error: Cannot find module 'name-of-local-dependency'".The text was updated successfully, but these errors were encountered: