Skip to content

WriteUtf8 does not take 5 arguments #832

Closed
@Sneezry

Description

@Sneezry

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:

node-gyp rebuild --target=3.0.10 --arch=x64 --dist-url=https://atom.io/download/electron

The raw error I got is

C:\Users\...\node_modules\nan\nan.h(1081): error C2660: 'v8::String
::WriteUtf8': function does not take 5 arguments (compiling source file ..\src\combined.cpp) [C:\...\xxx.vcxproj]

I find that the latest nan will call WriteUtf8 with 5 arguments if node version is larger than 10

nan/nan.h

Line 1081 in 55923c8

length_ = string->WriteUtf8(v8::Isolate::GetCurrent(), str_, static_cast<int>(len), 0, flags);

However, WriteUtf8 only accepts 4 arguments in node 10

https://v8docs.nodesource.com/node-10.6/d2/db3/classv8_1_1_string.html#a99aec0d3b418feca1f2a2ba79416c60b

Any ideas? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions