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

Error: Module did not self-register and prebuild-install failed with error #76

Open
adnanlah opened this issue Mar 27, 2024 · 3 comments

Comments

@adnanlah
Copy link

Hello,

I am having a problem trying to install and use this package in my Electron app. It worked fine in a Node.js app but not with Electron.

I have Electron.js version 28.2.0 and Node.js v18.18.1 installed.

When I try to install the package app I get this error:

build native dependency from sources  name=@thiagoelg/node-printer
                                          version=0.6.2
                                          platform=win32
                                          arch=x64
                                          napi=
                                          reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
                                          error=prebuild-install info begin Prebuild-install version 7.1.1
    prebuild-install warn install prebuilt binaries enforced with --force!
    prebuild-install warn install prebuilt binaries may be out of date!

and I get this error when I try to run the app:

App threw an error during load
Error: Module did not self-register: '\\?\C:\Users\ADNAN\dev\****\node_modules\@thiagoelg\node-printer\lib\node_printer.node'.
    at process.func [as dlopen] (node:electron/js2c/node_init:2:2214)
    at Module._extensions..node (node:internal/modules/cjs/loader:1356:18)
    at Object.func [as .node] (node:electron/js2c/node_init:2:2214)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at Module._load (node:internal/modules/cjs/loader:967:12)
    at c._load (node:electron/js2c/node_init:2:13672)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:119:18)

I have installed Desktop Development with C++ and Node.js development workloads installed.

image

We would really appreciate a fix for this as this package is essential for the the node-thermal-printer to work and I didn't find any alternative.

Thank you very much.

@Blair2004
Copy link

Hi, so bad there is no update on this, I'm also facing the same issue.

@Susheer
Copy link

Susheer commented Nov 30, 2024

Try this out! It eliminates many common issues during version upgrades. I'm using it in my project with the latest Electron version, and it works seamlessly. The library and APIs remain consistent, as this is a fork of the original project.
No dependencies on NAN or V8; Enabled with Napi addons

Electron Printer

@Alexssmusica
Copy link

There is this option too, it doesn't have all the APIs, but it works well

https://www.npmjs.com/package/printer-node-electron?activeTab=readme
https://github.com/Alexssmusica/printer-node-electron

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

No branches or pull requests

4 participants