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

Native module import problem #1393

Closed
3 tasks done
antoniosmgatto opened this issue Jan 13, 2020 · 3 comments
Closed
3 tasks done

Native module import problem #1393

antoniosmgatto opened this issue Jan 13, 2020 · 3 comments
Labels
bug plugin/webpack Issues or pull requests related to first-party webpack plugins/templates

Comments

@antoniosmgatto
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: 6.0.0-beta.47
  • Electron Version:: v6.1.7
  • Operating System: macOS 10.15.2

Expected Behavior

Load the native module.

Actual Behavior

The native module is in the correct path:

/Users/antoniomgatto/projects/electron-printer-test/.webpack/main/native_modules//lib/node_printer.node

but the app crash with this output.

App threw an error during load Error: Cannot find module '/Users/antoniomgatto/projects/electron-printer-test/.webpack/main/native_modules//lib/node_printer.node' at webpackEmptyContext (/Users/antoniomgatto/projects/electron-printer-test/.webpack/main/index.js:8956:10) at Object../node_modules/printer/lib/printer.js (/Users/antoniomgatto/projects/electron-printer-test/.webpack/main/index.js:9002:86) at __webpack_require__ (/Users/antoniomgatto/projects/electron-printer-test/.webpack/main/index.js:21:30) at Module../src/main.js (/Users/antoniomgatto/projects/electron-printer-test/.webpack/main/index.js:10138:65) at __webpack_require__ (/Users/antoniomgatto/projects/electron-printer-test/.webpack/main/index.js:21:30) at /Users/antoniomgatto/projects/electron-printer-test/.webpack/main/index.js:85:18 at Object.<anonymous> (/Users/antoniomgatto/projects/electron-printer-test/.webpack/main/index.js:88:10) at Module._compile (internal/modules/cjs/loader.js:786:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) at Module.load (internal/modules/cjs/loader.js:645:32) webpack built b17b24ad1f3cf056d7d3 in 1107ms

To Reproduce

https://github.com/antoniomgatto/electron-forge-test

Steps to reproduce the error:

yarn
yarn start

Additional Information

I created this project with the command below:

N/A

@malept malept added the plugin/webpack Issues or pull requests related to first-party webpack plugins/templates label Jan 23, 2020
@aperkaz
Copy link

aperkaz commented Jun 5, 2020

Any updates on this @antoniomgatto ?

@ysdexlic
Copy link

Same issue here, @antoniomgatto did you ever find a solution?

@MarshallOfSound
Copy link
Member

Duplicate of #1250

@MarshallOfSound MarshallOfSound marked this as a duplicate of #1250 Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug plugin/webpack Issues or pull requests related to first-party webpack plugins/templates
Projects
None yet
Development

No branches or pull requests

5 participants