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

Cannot compile on Raspbian on Raspberry Pi B 2 due to REPLACE_INVALID_UTF8 error (with solution) #40

Closed
dustinbolton opened this issue Dec 1, 2015 · 2 comments

Comments

@dustinbolton
Copy link

This may be worth noting in the documentation since it took me a long time to figure out. The latest Raspbian comes with a faulty Node v0.10.29 which is missing a UTF8 patch. This results in your epoll dependency failing to compile. Note gcc is v4.9.2.

The error shown is:

../node_modules/nan/nan.h:328:47: error: 'REPLACE_INVALID_UTF8' is not a member of 'v8::String'
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;

The only solution I found is to upgrade to a newer version, eg:

curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -
sudo apt-get install -y nodejs

This allows onoff to install as expected. It's unfortunate that the out of box Raspbian has this issue but hopefully others won't have to run into this issue too.

@fivdi
Copy link
Owner

fivdi commented Dec 1, 2015

Hmm, that's unfortunate. Thanks for the information. Debian for the BeagleBone Black had the same issue with Node.js v0.10.29. It means that practically no native add-ons can be installed. I'll add a notice to the README.

@fivdi
Copy link
Owner

fivdi commented Dec 2, 2015

This issue has been documented here in the wiki and wiki page has been linked to in the readme.

@dustinbolton thanks again for the information.

@fivdi fivdi closed this as completed Dec 2, 2015
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

2 participants