Errors while installing new 0.9.0 to new CentOS 7 VM
-
I followed the instructions listed here to setup a new install.
Here is a link to the errors
because i get this stupid error every time I try to post the code here.
-
I nuked the directory and pulled the master and it passed those errors with only warning about errors with optional packages.
Now it fails here
-
I spun up an Ubuntu 15.04 install and followed those directions. the site is up perfectly.
As I do not want to maintain an Ubuntu server when all my other stuff is CentOS, I would much prefer to have this on CentOS.
Any help would be appreciated.
-
Alright, I repeated everything this morning with the same result. I cannot install on CentOS 7 with the intructions as given.
There are problems during the npm install
-
First error, there are more.
make: Entering directory `/opt/daerma/nodebb/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o In file included from ../src/validation.cc:15:0: ../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; ^ make: *** [Release/obj.target/validation/src/validation.o] Error 1 make: Leaving directory `/opt/daerma/nodebb/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12) gyp ERR! System Linux 3.10.0-229.20.1.el7.x86_64 gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /opt/daerma/nodebb/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate gyp ERR! node -v v0.10.36 gyp ERR! node-gyp -v v0.10.6 gyp ERR! not ok In file included from ../src/bufferutil.cc:16:0: ../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; ^ npm WARN optional dep failed, continuing [email protected] make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1 make: Leaving directory `/opt/daerma/nodebb/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12) gyp ERR! System Linux 3.10.0-229.20.1.el7.x86_64 gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /opt/daerma/nodebb/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil gyp ERR! node -v v0.10.36 gyp ERR! node-gyp -v v0.10.6 gyp ERR! not ok npm WARN optional dep failed, continuing [email protected]
Final summary:
In file included from ../src/binding.cc:3:0: ../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; ^ make: *** [Release/obj.target/magic/src/binding.o] Error 1 make: Leaving directory `/opt/daerma/nodebb/node_modules/mmmagic/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12) gyp ERR! System Linux 3.10.0-229.20.1.el7.x86_64 gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /opt/daerma/nodebb/node_modules/mmmagic gyp ERR! node -v v0.10.36 gyp ERR! node-gyp -v v0.10.6 gyp ERR! not ok npm ERR! weird error 1 npm ERR! not ok code 0 [root@daermabb nodebb]#
-
All your logs and screenshots show a nodejs version 0.10.x. That's heavily outdated. Which manifests itself fataly in
../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;
i.e. a module, that needs compilation, can't find a member (
REPLACE_INVALID_UTF8
) of theString
class inv8
. It must have been introduced later. Upgrading to 0.12.x at least should solve this problem. -
@rbeer said:
All your logs and screenshots show a nodejs version 0.10.x. That's heavily outdated. Which manifests itself fataly in
../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;
i.e. a module, that needs compilation, can't find a member (
REPLACE_INVALID_UTF8
) of theString
class inv8
. It must have been introduced later. Upgrading to 0.12.x at least should solve this problem.Great. I can handle that. The problem then is the instructions are outdated even though someone updated them to show 0.9.x
https://docs.nodebb.org/en/latest/installing/os/centos.html
The instructions state to just pull nodejs from the repo. Looks like I cannot do that.
-
That might be true. I am not familiar with CentOS and its package management.
Replacing the install instructions in question with nodesource (https://github.com/nodesource/distributions/tree/master/), might be a good idea. I know e.g. that Debian also has 0.10.x in its repos.
-
For anyone else looking, here is how to get npm to install v.0.12.X
http://mangolassi.it/topic/5366/getting-nodejs-on-centos-7-with-nvm
Off to start over again and see if it works this time.
-
ends up like this.
-
Looks like some error with the initial database configuration? Did this step change too?
[root@daermabb nodebb]# ./nodebb setup 16/11 10:15 [2991] - info: NodeBB Setup Triggered via Command Line Welcome to NodeBB! This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed. Press enter to accept the default setting (shown in brackets). URL used to access this NodeBB (http://localhost:4567) Please enter a NodeBB secret (10055f4c-8d74-49c1-8eb0-a9619bcaaaff) Which database to use (redis) 16/11 10:15 [2991] - info: Now configuring redis database: Host IP or address of your Redis instance (127.0.0.1) Host port of your Redis instance (6379) Password of your Redis database Which database to use (0..n) (0) Configuration Saved OK [email protected] node_modules/redis [email protected] node_modules/connect-redis └── [email protected] ([email protected]) Populating database with default configs, if not already set... 16/11 10:16 [2991] - warn: NodeBB Setup Aborted. undefined [root@daermabb nodebb]#
-
To answer my own question, the redis instance is not running if you followed the instructions to this point. So enter
systemctl start redis
Then running
./nodebb setup
will have the expected results.This means that you also need to
systemctl enable redis
if you want it to work after reboot -
A quick
firewall-cmd --zone=public --add-port=4567/tcp --permanent
andfirewall-cmd --reload
later
And there we go.
Thanks @rbeer for the information about nodejs versions. I did not see the indicator that you did obviously.
-
created a pull request on the instructions.
https://github.com/NodeBB/nodebb-english/pull/68 -
@JaredBusch said:
A quick
firewall-cmd --zone=public --add-port=4567/tcp --permanent
andfirewall-cmd --reload
later
And there we go.
Thanks @rbeer for the information about nodejs versions. I did not see the indicator that you did obviously.
Very nice! Glad to see it working now.
And, don't you worry! I was tearing my hair out for about an hour, when I stumbled upon that error some weeks ago.