Upgrading from v0.6.1 to v0.9.0

  • I am trying to do a minor update for the first time.

    I followed the documentation here :

    So basically I did this:
    $ git fetch
    $ git reset --hard origin/v0.6.x # Replace v0.3.x with the branch name!
    $ ./nodebb upgrade

    After the update is completed, I started up nodebb and in my panel I still see 0.6.1 as my version?
    You are running NodeBB v0.6.1.
    A new version (v0.9.0) has been released. Consider upgrading your NodeBB.

    I am trying small upgrade since I would like to move to 0.9.0 eventually, but don't want to break stuff. dump.rdb is saved safelly on Amazon S3. Thanks

  • Admin

    v0.6.1 is the latest version in the v0.6.x branch 😄

    Next step, v0.7.x!

  • Oh really?
    I was following this update log and I see 0.6.2 there:

    Just want to update carefully as this is a live forum 🙂

  • Admin

    Looks like we went ahead and launched v0.7.0 instead. Those fixes mentioned actually belong with v0.6.1, so I'll update the article accordingly 😄

  • Thanks Julian for the clarification!

    So updating one branch at a time is the way to go?
    For example, I would do:
    0.6.1 --> 0.7.0
    0.7.0 --> 0.7.3
    0.7.3 ---> 0.8.0
    0.8.0 ---> 0.8.2
    0.8.2 ---> 0.9.0

  • Admin


    v0.6.1 --> v0.7.3
    v0.7.3 --> v0.8.2
    v0.8.2 --> v0.9.0

    No need to upgrade to the base version of each branch. When you checkout the v0.x.x branch, you'll be updated to the latest code in that branch.

    I believe from 7 to 8, you'll need to run npm i before ./nodebb upgrade.

  • Sounds good, should be easier this way.

    before running the /nodebb upgrade, do you need to have redis running so that it update the dump file?
    Got that for 7 to 8, what does "npm i" do? I am on CentOS and have updated everything with "yum update"

  • Admin

    @maximus123 yum update updates your server's packages, and is not really related to NodeBB. npm install updates NodeBB's dependencies, which are saved locally in the node_modules/ folder.

    ./nodebb upgrade does it for you, usually, but in that specific instance, the upgrade script got rewritten and relies on a couple dependencies that aren't installed yet, so you have to install them first 😄

  • Perfect, so if the update script shows some missing dependencies, I will run "npm install"
    Should be good to go now, will try to update tonight.

  • Hey Julian,

    Just want to understand something before I start the upgrade process.
    Will the dump.rdb (redis database) be compatible with the newer version (0.9.0)? Has the database structure changed between version?

    I am now on 0.6.1, my upgrade plan is this:

    EDIT :
    updating the plan while I'm doing the update, I'm now on 0.7.3

    #Backup dump.rdb

    v0.6.1 --> v0.7.3
    $ git fetch
    $ git checkout v0.7.x
    $ npm install (needed before upgrade, missing dep.)
    $ ./nodebb upgrade
    #Start nodebb, test if changes worked

    v0.7.3 --> v0.8.2
    $ git fetch
    $ git checkout v0.8.x
    $ ./nodebb upgrade
    DONE!, had to install some missing dependecy with npm, see under this post for details

    v0.8.2 --> v0.9.0
    $ git fetch
    $ git checkout v0.9.x
    $ npm install (inside /nodebb directory)
    $ ./nodebb upgrade

    I also made change to the code of a plugin I'm using Emailer (Postmark v 0.4.0), will the changes carry on or be overwritten by the upgrade process?
    Let me know if something is not safe or missing in my upgrade plan, thanks a lot!

  • Having a problem running ./nodebb upgrade from 0.7.x to 0.8.x

    In file included from ../src/binding.cc:3:
    ../node_modules/nan/nan.h:316: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
    make: *** [Release/obj.target/magic/src/binding.o] Error 1
    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 2.6.32-573.1.1.el6.x86_64
    gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/maximur1/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

    inside :
    npm http 200 https://registry.npmjs.org/nan/-/nan-2.0.9.tgz

    I tried npm install before but I get the same error.. investingating

  • Admin

    Hmmmmm, can you downgrade Node.js? You'll need v0.10/v0.11/v0.12 for the v0.8.x branch and older. v0.9.x supports Node.js v4/5

  • Should I just go directly to 0.9.x and skip 0.8.x? Or is the update script mandatory to run between major version? Thanks

  • Admin

    If when upgrading from 0.7.x to 0.8.x, node app --upgrade completes without issue, you can move on ahead to v0.9.x branch.

  • Unfortunately no, I think I have to fix the nan-2.0.9 issue first

    Error while trying node app --upgrade

    throw err;
    Error: Cannot find module 'mmmagic'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/maximur1/nodebb/src/file.js:7:12)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

  • Ok I got it to work but have this warning.. investigating

    maximur1@server.maximumtrainer.com [nodebb]# sudo ./nodebb upgrade

    1. Bringing base dependencies up to date... OK

    2. Updating NodeBB data store schema.
      13/11 16:39 [5107] - error: Unable to initialize Redis! Is Redis installed? Error :Cannot find module 'redis'

    3. Storing upgrade date in "package.json"... OK

                                          NodeBB Upgrade Complete!

  • Admin

    Looks like it did not upgrade (despite the success message)... please npm install redis@~0.10.1 connect-redis@~2.0.0

    ... and try the upgrade again

  • I have Redis 2.8.19 installed

    maximur1@server.maximumtrainer.com [~]# sudo redis-server --version
    Redis server v=2.8.19 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=8012391549b7b328

    Ok! will do!
    Still getting the error after your command, should redis be up and running? it's running ATM.

    Note: I updated npm to solve the issue up there (REPLACE_INVALID_UTF8), now i'm on 3.4.0
    maximur1@server.maximumtrainer.com [nodebb]# sudo npm -v

  • Trying to do a "npm rebuild" on nodebb and getting this

    maximur1@server.maximumtrainer.com [nodebb]# sudo npm rebuild
    heapdump@0.3.7 install /home/maximur1/nodebb/node_modules/heapdump
    node-gyp rebuild
    gyp ERR! clean error
    gyp ERR! stack Error: EACCES, unlink 'build/Makefile'
    gyp ERR! System Linux 2.6.32-573.1.1.el6.x86_64
    gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/maximur1/nodebb/node_modules/heapdump
    gyp ERR! node -v v0.10.36
    gyp ERR! node-gyp -v v3.0.3
    gyp ERR! not ok

    npm ERR! Linux 2.6.32-573.1.1.el6.x86_64
    npm ERR! argv "node" "/usr/bin/npm" "rebuild"
    npm ERR! node v0.10.36
    npm ERR! npm v3.4.0
    npm ERR! code ELIFECYCLE
    npm ERR! heapdump@0.3.7 install: node-gyp rebuild
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the heapdump@0.3.7 install script 'node-gyp rebuild'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the heapdump package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! node-gyp rebuild
    npm ERR! You can get their info via:
    npm ERR! npm owner ls heapdump
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR! /home/maximur1/nodebb/npm-debug.log

    Also, not sure why nodebb think I have redis 2.3.0 installed? I am on 2.8.19

    maximur1@server.maximumtrainer.com [nodebb]# sudo npm install

    • double-ended-queue@2.1.0-0 node_modules/double-ended-queue
    • redis@2.3.0 node_modules/redis

    maximur1@server.maximumtrainer.com [nodebb]# sudo node app --upgrade
    13/11 17:05 [5988] - info: NodeBB v0.8.2 Copyright (C) 2013-2014 NodeBB Inc.
    13/11 17:05 [5988] - info: This program comes with ABSOLUTELY NO WARRANTY.
    13/11 17:05 [5988] - info: This is free software, and you are welcome to redistribute it under certain conditions.
    13/11 17:05 [5988] - info:
    13/11 17:05 [5988] - error: Unable to initialize Redis! Is Redis installed? Error :Cannot find module 'redis'

  • Admin

    Redis module and redis server doesn't match, so that should be okay...

    npm ls redis?



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