Skip to content
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

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

Closed
danwdart opened this issue Aug 13, 2015 · 11 comments

Comments

@danwdart
Copy link

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

@kkoopa
Copy link
Collaborator

kkoopa commented Aug 13, 2015

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

@bnoordhuis
Copy link
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.

@kkoopa
Copy link
Collaborator

kkoopa commented Aug 13, 2015

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

@kkoopa kkoopa closed this as completed Aug 13, 2015
@rmoetwil
Copy link

@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.

@danwdart
Copy link
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.

@danwdart
Copy link
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

@neilhhw
Copy link

neilhhw commented Dec 15, 2015

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

@easonzhou
Copy link

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

@tmorford
Copy link

tmorford commented Mar 4, 2016

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?

@realAkhmed
Copy link

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

@ech0s7r
Copy link

ech0s7r commented Mar 30, 2018

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants