-
-
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
Node modules not imported accurately compared to local, missing files. #7964
Comments
I am currently resorting to copying over the entire |
I have the exact same issue. |
So it is indeed part of the default electron-builder/packages/app-builder-lib/src/util/NodeModuleCopyHelper.ts Lines 29 to 30 in 17b5081
I agree with @mikaelcolboc that it might not be best for three.js to have addons in the |
Thanks @mmaietta for confirming that! So what's the next step? I would address it here for now. Adding an option to disable or have a custom topLevelExcludedFiles set seems reasonable. |
So I'm hesitant to add another property as I think there may be an intrinsic issue with how Can you share a minimum reproducible repo for this issue? I can debug it further locally and probably add some unit tests to cover this use case. |
Thanks, I just created a private demo repo electron-builder-threejs-bug-example and added you to it. |
Created PR #8043 and added unit tests for this use case. Now you can leverage
|
Electron-Builder Version: 24.9.1
Node Version: 18.15.0
Electron Version: 28.1.1
Electron Type (current, beta, nightly): current
Target: MacOS (Ventura M2)
electron-builder
is not accurately importing the ThreeJS module into thenode_modules
directory. I have tried many versions of ThreeJS, but it has no effect on the packaged app. Below is a side-by-side comparison of the difference in thethree
module located innode_modules
. Above isnode_modules/three
unpacked from theapp.asar
located in theResources
of the MacOS application. Below is the module as it looks like from local development, not packaged whatsoever.As you can see, it is missing the
examples
directory, which contains many crucial files needed for the application to work, such asOrbitControls
, etc. Is there any reasonelectron-builder
is not including theexamples
directory? I have also tried including ThreeJS directly inpackage.json
using thefiles
option, but that seems to have no effect. Here is the entire build configuration:Some more info: IonIcons, another module I am using, seems to import entirely fine; the packaged and unpackaged versions in
node_modules
look entirely the same.The text was updated successfully, but these errors were encountered: