NodObjC: when electron update to 1.2.1 the NodObjc it does not work
@TooTallNate
Hi TooTallNate, I have a problem when my electron from 1.1.1 update to 1.2.1 when it use nodobjc call objective-c framework like this:
app threw an error during load
TypeError: error setting argument 0 - writePointer: Buffer instance expected as third argument
at TypeError (native)
at Object.writePointer (/Users/apple/talk/electron-quick-start-master/node_modules/ref/lib/ref.js:742:11)
at Object.set (/Users/apple/talk/electron-quick-start-master/node_modules/ref/lib/ref.js:484:13)
at Object.alloc (/Users/apple/talk/electron-quick-start-master/node_modules/ref/lib/ref.js:516:13)
at Object.proxy as objc_getClassList
at Object.getClassList (/Users/apple/talk/electron-quick-start-master/node_modules/nodobjc/lib/core.js:111:20)
at Object.importFramework (/Users/apple/talk/electron-quick-start-master/node_modules/nodobjc/lib/import.js:321:26)
at Function.framework (/Users/apple/talk/electron-quick-start-master/node_modules/nodobjc/lib/index.js:225:18)
at Object. (/Users/apple/talk/electron-quick-start-master/main.js:14:9)
^C
I need your help,thanks.
About this issue
- Original URL
- State: open
- Created 8 years ago
- Reactions: 3
- Comments: 17 (1 by maintainers)
@imlliu2005 @matheuss @slaskis @TooTallNate @greenimpala @kmartinezmedia @atdrago
I haven’t been coding for long, so forgive me if this is a little long winded ( I think I have a solution to this issue ):
I’m using
Electron v1.4.5&node v7.0.0& I’m getting this error:Error: Module version mismatch. Expected 50, got 51.In case it helps understand this a little further, I think the 50 in
Expected 50, got 51relates to the following:And the 51 in
Expected 50, got 51relates to this:So, to get
Electron&NodObjCworking again, run this in the root of your project directory:The
--targetyou can get from your project, like this:and the
--abiyou can get from your project too, like this:This worked for me, and I was pretty happy with myself !
Just for completeness, here is the original full error:
Hope this helps you guys (until Electron & Node get there versions synced)
Any info/workaround/fix on this? 😕
I think the reason is that node hasn’t updated v8 to 5.1+ yet, while Electron has.
At least in node 6.3.0: