Error: 'NewSymbol is not a member of' v8 :: String?

Since updating NodeJS to 0.11.13, which integrates the V8 3.24.35.22 engine, I get this error on some C ++ modules:

error: ‘NewSymbol’ is not a member of ‘v8::String’

What should I do instead of NewSymbol?

thank

+4
source share
3 answers

V8 has made some changes. I agree that you need to use NaN for a better evolution of V8. This is a good macroform.

v8::String::New("test")converted to NanSymbol("test").

But all the new methods have been changed with a beautiful template.

NanNew<v8::Integer>(1)for example for an integer.

+4
source

NodeJS 0.11.13 make me cry.

nan library. NodeJS . .

deps, String::newFromUtf8.

: V8.

0

The V8 String API was purged some time ago to describe Unicode encodings in more detail and to avoid confusion with the anticipatory concept of ES6 characters.

Now you want to use String :: NewFromUtf8 , String :: NewFromOneByte or String :: NewFromTwoByte with the corresponding arguments.

0
source

Source: https://habr.com/ru/post/1539319/


All Articles