-
Notifications
You must be signed in to change notification settings - Fork 100
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
Compiling Error with node-gyp on Win10x64 and Electron #16
Comments
I know I'm pretty late to the party but I ran into this today. For others coming here with the same issue, you need to use something like electron-rebuild to get native modules working ( see: http://electron.atom.io/docs/tutorial/using-native-node-modules ) and is not a problem exclusive to font-manager. What I did to get font-manager working in my electron app:
|
I eventually gave up on native font modules. With each change in Node/Chromium everything would break all over again. It was taking too much of my time, so I made a package which uses pure JavaScript. It's currently being used in a production application around the world without issue. If you're interested: https://www.npmjs.com/package/system-font-families |
Thanks @rBurgett!! Your package works great in my electron project. Really appreciate your work 🙏 |
I am trying to get font-manager installed with electron.
Current System Setup:
Following output is generated when run "install font-manager"
`electron-quick-start master > $ npm install font-manager
[email protected] install Q:\workspace\ALEXANDER\electron\electron-quick-start\node_modules\font-manager
node-gyp rebuild
Q:\workspace\ALEXANDER\electron\electron-quick-start\node_modules\font-manager>if not defined npm_config_node_gyp (node
"C:\Users\Alex\AppData\Local\scoop\apps\nodejs\6.2.0\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-g
yp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hinzufügen.
FontManager.cc
FontManagerWindows.cc
..\src\FontManagerWindows.cc(462): warning C4267: "Argument": Konvertierung von "size_t" nach "UINT32", Datenverlust möglich [Q:\workspace\ALEXANDER\electron\electron-quick-start\node_modules\font-manager\build\fontmanager.vcxproj]
q:\workspace\alexander\electron\electron-quick-start\node_modules\nan\nan_new.h(208): warning C4267: "Argument": Konvertierung von "size_t" nach "int", Datenverlust möglich (Quelldatei wird kompiliert ..\src\FontManager.cc) [Q:\workspace
ALEXANDER\electron\electron-quick-start\node_modules\font-manager\build\fontmanager.vcxproj]
..\src\FontManager.cc(19): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-template "v8: :Localv8::Array Nan::New<v8::Array,unsigned __int64>(A0)".
with
[
A0=unsigned __int64
]
win_delay_load_hook.c
Bibliothek "Q:\workspace\ALEXANDER\electron\electron-quick-start\node_modules\font-manager\build\Release\fontmanag
er.lib" und Objekt "Q:\workspace\ALEXANDER\electron\electron-quick-start\node_modules\font-manager\build\Release\font
manager.exp" werden erstellt.
Code wird generiert.
Codegenerierung ist abgeschlossen.
fontmanager.vcxproj -> Q:\workspace\ALEXANDER\electron\electron-quick-start\node_modules\font-manager\build\Release
fontmanager.node
[email protected] Q:\workspace\ALEXANDER\electron\electron-quick-start
-- [email protected] extraneous
If I then start electron via "npm start" the dev tools log:
ELECTRON_ASAR.js:158 Uncaught Error: Eine DLL-Initialisierungsroutine ist fehlgeschlagen. \\?\Q:\workspace\ALEXANDER\electron\electron-quick-start\node_modules\font-manager\build\Release\fontmanager.node
Is this a node-gyp issue? Or am I missing something?
The text was updated successfully, but these errors were encountered: