-
Notifications
You must be signed in to change notification settings - Fork 505
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
WriteUtf8 does not take 5 arguments #832
Comments
The 4 param version has been deprecated in v8 in favor of the 5 param version and this has been backported to node 10 (see nodejs/node#22531). Therefore the linked v8 docs don't match to the actual variant of v8 used by node. I assume that the same did not happen in electron and as a result some ifdefs are wrong in this setup. |
Actually it seems that the backport of the v8 change was done with Node 10.10.0. Therefore if someone uses Nan 2.12.0 with Node 10.0.0 till 10.9.0 build will fail. |
Caused by #825 - seems it's a decision between build errors and deprecation warnings. |
This also fails in Node 10.11.0 |
@amb26 I guess you mean compiling electron with NodeJs 10.10.0. Or some native node extension? |
@Flarna following your suggestion from TryGhost/node-sqlite3#1093 (review) I got this situation:
|
I'll put up a PR with a fix shortly. |
#833 - would be great if an Electron user could test it out as well. |
Using |
For anyone like myself who's just trying to get their app to build whilst waiting for #833 to land.
|
The five argument WriteUtf8() method was introduced in Node.js v10.0.0, it doesn't exist in older 10.x releases. Use the four argument overload and a bunch of pragmas to silence the compiler warnings. Fixes: nodejs/nan#832 Refs: nodejs/nan#825
Hi, I have no idea if I made some mistake. But I cannot rebuild nan with electron 3.0.10 (with node 10.2.0).
With command below to rebuild:
The raw error I got is
I find that the latest nan will call
WriteUtf8
with 5 arguments if node version is larger than 10nan/nan.h
Line 1081 in 55923c8
However,
WriteUtf8
only accepts 4 arguments in node 10https://v8docs.nodesource.com/node-10.6/d2/db3/classv8_1_1_string.html#a99aec0d3b418feca1f2a2ba79416c60b
Any ideas? Thanks.
The text was updated successfully, but these errors were encountered: