Open renegadeandy opened 7 years ago
I don't know anything about electron. Using webpack with a native module like libxml-xsd surprises me, but I guess electron provides some kind of hybrid environment in which it makes sense.
Have you seen tutorials like this one ?
I am by no means an expert, I think that webpack in this case I think compiles the typescript amongst other things.
I have installed electron-rebuild like you have suggested and this is the output:
Andys-MacBook-Pro-2:MyApp myusername$ $(npm bin)/electron-rebuild
✖ Rebuild Failed
An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@6.11.1 | darwin | x64
gyp http GET https://atom.io/download/electron/v1.4.5/iojs-v1.4.5.tar.gz
gyp http 200 https://atom.io/download/electron/v1.4.5/iojs-v .4.5.tar.gz
gyp http GET https://atom.io/download/electron/v1.4.5/SHASUMS256.txt
gyp http 200 https://atom.io/download/electron/v1.4.5/SHASUMS256.txt
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/myusername/Documents/Personal/MyApp/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/myusername/Documents/Personal/MyApp/node_modules/libxml-xsd/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/myusername/Documents/Personal/MyApp/node_modules/libxml-xsd/common.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/myusername/Documents/Personal/MyApp/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/myusername/.electron-gyp/.node-gyp/iojs-1.4.5/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/myusername/.electron-gyp/.node-gyp/iojs-1.4.5',
gyp info spawn args '-Dnode_gyp_dir=/Users/myusername/Documents/Personal/MyApp/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/myusername/.electron-gyp/.node-gyp/iojs-1.4.5/<(target_arch)/iojs.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/myusername/Documents/Personal/MyApp/node_modules/libxml-xsd',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/node-libxml-xsd/src/schema.o
../src/schema.cc:31:52: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
Local<Object> wrapper = Nan::New(constructor)->NewInstance();
^
/Users/myusername/.electron-gyp/.node-gyp/iojs-1.4.5/deps/v8/include/v8.h:3287:52: note: 'NewInstance' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
^
1 warning generated.
CXX(target) Release/obj.target/node-libxml-xsd/src/node_libxml_xsd.o
../src/node_libxml_xsd.cc:1:9: warning: 'BUILDING_NODE_EXTENSION' macro redefined [-Wmacro-redefined]
#define BUILDING_NODE_EXTENSION
^
<command line>:8:9: note: previous definition is here
#define BUILDING_NODE_EXTENSION 1
^
1 warning generated.
SOLINK_MODULE(target) Release/node-libxml-xsd.node
clang: error: no such file or directory: '/Users/myusername/Documents/Personal/MyApp/node_modules/libxmljs-mt/build/Release/xmljs.node'
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
make: *** [Release/node-libxml-xsd.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/myusername/Documents/Personal/MyApp/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.6.0
gyp ERR! command "/usr/local/bin/node" "/Users/myusername/Documents/Personal/MyApp/node_modules/.bin/node-gyp" "rebuild" "--target=1.4.5" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/myusername/Documents/Personal/MyApp/node_modules/libxml-xsd
gyp ERR! node -v v6.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Failed with exit code: 1
Error: gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@6.11.1 | darwin | x64
gyp http GET https://atom.io/download/electron/v1.4.5/iojs-v1.4.5.tar.gz
gyp http 200 https://atom.io/download/electron/v1.4.5/iojs-v1.4.5.tar.gz
gyp http GET https://atom.io/download/electron/v1.4.5/SHASUMS256.txt
gyp http 200 https://atom.io/download/electron/v1.4.5/SHASUMS256.txt
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/myusername/Documents/Personal/MyApp/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/myusername/Documents/Personal/MyApp/node_modules/libxml-xsd/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/myusername/Documents/Personal/MyApp/node_modules/libxml-xsd/common.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/myusername/Documents/Personal/MyApp/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/myusername/.electron-gyp/.node-gyp/iojs-1.4.5/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/myusername/.electron-gyp/.node-gyp/iojs-1.4.5',
gyp info spawn args '-Dnode_gyp_dir=/Users/myusername/Documents/Personal/MyApp/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/myusername/.electron-gyp/.node-gyp/iojs-1.4.5/<(target_arch)/iojs.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/myusername/Documents/Personal/MyApp/node_modules/libxml-xsd',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/node-libxml-xsd/src/schema.o
../src/schema.cc:31:52: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
Local<Object> wrapper = Nan::New(constructor)->NewInstance();
^
/Users/myusername/.electron-gyp/.node-gyp/iojs-1.4.5/deps/v8/include/v8.h:3287:52: note: 'NewInstance' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
^
1 warning generated.
CXX(target) Release/obj.target/node-libxml-xsd/src/node_libxml_xsd.o
../src/node_libxml_xsd.cc:1:9: warning: 'BUILDING_NODE_EXTENSION' macro redefined [-Wmacro-redefined]
#define BUILDING_NODE_EXTENSION
^
<command line>:8:9: note: previous definition is here
#define BUILDING_NODE_EXTENSION 1
^
1 warning generated.
SOLINK_MODULE(target) Release/node-libxml-xsd.node
clang: error: no such file or directory: '/Users/myusername/Documents/Personal/MyApp/node_modules/libxmljs-mt/build/Release/xmljs.node'
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
make: *** [Release/node-libxml-xsd.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/myusername/Documents/Personal/MyApp/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.6.0
gyp ERR! command "/usr/local/bin/node" "/Users/myusername/Documents/Personal/MyApp/node_modules/.bin/node-gyp" "rebuild" "--target=1.4.5" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/myusername/Documents/Personal/MyApp/node_modules/libxml-xsd
gyp ERR! node -v v6.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Failed with exit code: 1
at SafeSubscriber._error (/Users/myusername/Documents/Personal/MyApp/node_modules/spawn-rx/lib/src/index.js:267:84)
at SafeSubscriber.__tryOrUnsub (/Users/myusername/Documents/Personal/MyApp/node_modules/spawn-rx/node_modules/rxjs/Subscriber.js:238:16)
at SafeSubscriber.error (/Users/myusername/Documents/Personal/MyApp/node_modules/spawn-rx/node_modules/rxjs/Subscriber.js:197:26)
at Subscriber._error (/Users/myusername/Documents/Personal/MyApp/node_modules/spawn-rx/node_modules/rxjs/Subscriber.js:128:26)
at Subscriber.error (/Users/myusername/Documents/Personal/MyApp/node_modules/spawn-rx/node_modules/rxjs/Subscriber.js:102:18)
at MapSubscriber.Subscriber._error (/Users/myusername/Documents/Personal/MyApp/node_modules/spawn-rx/node_modules/rxjs/Subscriber.js:128:26)
at MapSubscriber.Subscriber.error (/Users/myusername/Documents/Personal/MyApp/node_modules/spawn-rx/node_modules/rxjs/Subscriber.js:102:18)
at SafeSubscriber._next (/Users/myusername/Documents/Personal/MyApp/node_modules/spawn-rx/lib/src/index.js:241:65)
at SafeSubscriber.__tryOrUnsub (/Users/myusername/Documents/Personal/MyApp/node_modules/spawn-rx/node_modules/rxjs/Subscriber.js:238:16)
at SafeSubscriber.next (/Users/myusername/Documents/Personal/MyApp/node_modules/spawn-rx/node_modules/rxjs/Subscriber.js:185:22)
Any idea how to solve some of these upset looking messages?
Any ideas?
No, not really.
Do you use node 8 ? cf https://github.com/albanm/node-libxml-xsd/issues/22
Dont believe so:
node -v v6.11.1
If it would be useful to you - I could share the repo and you could take a closer look if you were willing?
I don't have a lot of time to spend on that, so I can't make any promise. But if you share everything that is needed to recreate the problem, yes I will have a look.
Please see the well documented error here:
https://stackoverflow.com/questions/45165249/using-libxml-xsd-in-an-electron-app-fails-with-bindings-error