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.

    img



  • I nuked the directory and pulled the master and it passed those errors with only warning about errors with optional packages.

    img

    Now it fails here

    img



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

    img



  • 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 utf-8-validate@1.2.1
    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 bufferutil@1.2.1
    

    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]#

  • GNU/Linux

    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 the String class in v8. 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 the String class in v8. 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.


  • GNU/Linux

    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

    Off to start over again and see if it works this time.



  • ends up like this.

    img



  • 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
    
    redis@0.10.3 node_modules/redis
    
    connect-redis@2.0.0 node_modules/connect-redis
    └── debug@2.2.0 (ms@0.7.1)
    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 and firewall-cmd --reload later
    And there we go.
    img

    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


  • GNU/Linux

    @JaredBusch said:

    A quick firewall-cmd --zone=public --add-port=4567/tcp --permanent and firewall-cmd --reload later
    And there we go.
    img

    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. :+1:
    And, don't you worry! I was tearing my hair out for about an hour, when I stumbled upon that error some weeks ago. :)


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.