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

Asset relocator messes up some packages #2328

Closed
3 tasks done
cesarvarela opened this issue Jun 17, 2021 · 2 comments · Fixed by #2320
Closed
3 tasks done

Asset relocator messes up some packages #2328

cesarvarela opened this issue Jun 17, 2021 · 2 comments · Fixed by #2320
Labels

Comments

@cesarvarela
Copy link

Preflight Checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Issue Details

  • Electron Forge Version:
  • Electron Version:
    *v13.0.1
  • Operating System:
    • Windows 10
  • Last Known Working Electron Forge version::
    n/a

Expected Behavior

I'm working on a project using 2 native modules:
https://github.com/kristian/displays & https://github.com/octalmage/robotjs

The displays package works and the robotjs package doesn't.

Actual Behavior

The diaplays package gets copied to the native_modules folder and works without issue, the robotjs package gets copied too but an intermediate (?) module is created:

image

wich contains this:

image

And results in this error:

image

Replacing the weird intermediate module with the actual robotjs binary works, so I guess the static analysis is triggering a different code path for the robotjs module that is not actually needed and should behave the same as with the other module.

@ivancuric
Copy link

Does it work with https://github.com/timfish/forge-externals-plugin or when changing the asset relocator loader to this fork https://www.npmjs.com/package/@timfish/webpack-asset-relocator-loader ?

@cesarvarela
Copy link
Author

Thanks, tried both and none worked, the externals plugin copied some modules to the node_modules folder but some are missing still it seems. The asset relocator one did exactly the same as the one from marshalofsound.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants