Skip to content

nan.h:318:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’ #414

Closed

Description

@emberdart

Hi

When trying to build iconv which deoends on this package I get the errors:

|
|

node-gyp rebuild

make: Entering directory '/home/dan/www/code/dartcomm/node_modules/iconv/build'
CC(target) Release/obj.target/libiconv/deps/libiconv/lib/iconv.o
AR(target) Release/obj.target/iconv.a
COPY Release/iconv.a
CXX(target) Release/obj.target/iconv/src/binding.o
In file included from ../src/binding.cc:18:0:
../../nan/nan.h:318:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
iconv.target.mk:99: recipe for target 'Release/obj.target/iconv/src/binding.o' failed
make: *** [Release/obj.target/iconv/src/binding.o] Error 1
make: Leaving directory '/home/dan/www/code/dartcomm/node_modules/iconv/build'

I'm using the latest node and npm from Debian sid (v0.10.38/1.4.21)

Could somebody help me on this please

Cheers

Activity

  1. kkoopa commented on Aug 13, 2015

    @kkoopa
    Collaborator

    You're using the wrong headers somehow. The headers for 0.10.38 include
    REPLACE_INVALID_UTF8
    https://github.com/joyent/node/blob/v0.10.38/deps/v8/include/v8.h#L1083

    On Thursday 13 August 2015 02:48:29 Dan Dart wrote:

    Hi

    When trying to build iconv which deoends on this package I get the errors:

    iconv@2.1.10 install /home/dan/www/code/dartcomm/node_modules/iconv
    node-gyp rebuild

    make: Entering directory
    '/home/dan/www/code/dartcomm/node_modules/iconv/build' CC(target)
    Release/obj.target/libiconv/deps/libiconv/lib/iconv.o AR(target)
    Release/obj.target/iconv.a
    COPY Release/iconv.a
    CXX(target) Release/obj.target/iconv/src/binding.o
    In file included from ../src/binding.cc:18:0:
    ../../nan/nan.h:318:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of
    ‘v8::String’ static const unsigned kReplaceInvalidUtf8 =
    v8::String::REPLACE_INVALID_UTF8; ^
    iconv.target.mk:99: recipe for target
    'Release/obj.target/iconv/src/binding.o' failed make: ***
    [Release/obj.target/iconv/src/binding.o] Error 1
    make: Leaving directory
    '/home/dan/www/code/dartcomm/node_modules/iconv/build'

    I'm using the latest node and npm from Debian sid (v0.10.38/1.4.21)

    Could somebody help me on this please

    Cheers


    Reply to this email directly or view it on GitHub:
    #414

  2. bnoordhuis commented on Aug 13, 2015

    @bnoordhuis
    Member

    I speculate that the debian-packaged node is missing the REPLACE_INVALID_UTF8 patch from v0.10.29 (nodejs/node@881ac26). I suggest you ping the debian package maintainers about that. Maybe cc the maintainers of the libv8 package as well.

  3. kkoopa commented on Aug 13, 2015

    @kkoopa
    Collaborator

    Install the Nodesource build instead. https://github.com/nodesource/distributions

  4. rmoetwil commented on Aug 17, 2015

    @rmoetwil

    @dandart I had the same issue on debian. It's not the node version, but the node-gyp that comes with npm 1.4.21.
    Try upgrading to a newer version of node-gyp.

  5. emberdart commented on Aug 17, 2015

    @emberdart
    Author

    I just did a "npm -g install npm" to upgrade the debian's npm to npm's npm and that presumably included node-gyp and that fixed it so thanks...

    however I'm getting other weird errors relating to node-stringprep which I'm not sure are related, but I can install node-stringprep on its own weirdly.

  6. emberdart commented on Aug 17, 2015

    @emberdart
    Author

    never mind - the stringprep bug turned out to be that I didn't have libicu-dev

    Everything's fine now, thanks for your help

  7. neilhhw commented on Dec 15, 2015

    @neilhhw

    I just did a "npm -g install npm" to upgrade the debian's npm to npm's npm and that presumably included node-gyp and that fixed it so thanks...
    Thanks, it works also fine to me

  8. easonzhou commented on Feb 26, 2016

    @easonzhou

    "npm -g install npm" works for me, too. :-)

  9. tmorford commented on Mar 4, 2016

    @tmorford

    Yes thank you that did work I am getting the information correctly now. I just have one more question is there a way to get the UUID and Major and Minor using Noble?

  10. realAkhmed commented on May 31, 2016

    @realAkhmed

    Raspberry Pi 3 checking in... just using sudo npm -g install npm didn't work but adding node-gyp did the trick

    $ sudo npm -g install npm node-gyp
    
  11. ech0s7r commented on Mar 30, 2018

    @ech0s7r

    Update nodejs to the latest version will fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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