Update from v0.7.0 to v1.4.0



  • Hi. Sorry for my English.

    I have forum on version 0.7.0 of NodeBB + MongoDB. I try to update step by step to 1.4.0 throught the version 0.8.0 and over and I stack in this step. I tried many versions of nodejs 0.12.x, 4.x, 6.x. Try to do it on Linux and on Windows. But in any case I faced with errors. It`s npm install errors with lwip or else, or errors with strict mode in modules when i try to update base and etc.

    If I was try to update on 0.9.0 it is warn that I skip middle updates.

    Is there any posible to update base manualy or else from 0.7.0 to edge version? Or maybe it posible install clear version and make import from old forum all users, categories and threads?

    Thanks.



  • If you get errors may be best solution make update with smaller steps.

    If you get error with updating from v0.7.0 to v0.8.0, IMHO you can try update v0.7.0 to v0.7.1?



  • I get errors not from NodeBB itself, errors gets from old and new environments dissonance. Especially from node_modules dependensies which in 0.7.0 times was like ~1.x.x in external libraries exept strictly =1.1.1.

    I usualy can`t pick up environment for 0.7.0 on my home workspace. Forum live for 1.5 year on Heroku.
    And I am not sure that nothing breaks if I start updatings on production.

    I try to put the dump of base under version 1.4.0. But it`s breaks on creation index key_1_value-1 with dups. I clean up all dups with pair (_key, value), but catch another error from some lib.

    Is there any fixed env for direct versions or maybe docker containers?


  • Admin

    When you get the lwip error, uninstall it and the other compiled package completely.

    I think around then is when we got rid of them:

    $ npm unl mmmagic lwip
    


  • But when i uninstall lwip and mmagic and then node app.js --upgrade on v 0.8.2

    Error in mongodb module: Error: Cannot find module 'lwip'


  • Admin

    Use ./nodebb upgrade



  • @julian said in Update from v0.7.0 to v1.4.0:

    Use ./nodebb upgrade

    '.' is not recognized as an internal or external command,
    operable program or batch file.



  • You need do in in folder where Nodebb installed. Use cd folder_name

    russian: команду надо выполнять в папке, где установлен форум.



  • @alff0x1f said in Update from v0.7.0 to v1.4.0:

    You need do in in folder where Nodebb installed. Use cd folder_name

    russian: команду надо выполнять в папке, где установлен форум.

    Ok. I understand it. But it's not that. It is still the exact same thing "node app --upgrade" inside.

    Perhaps anyeone has experience in manual database transfer. It should not be so difficult.

    Maybe there is some kind of description of the database structure?


  • Global Moderator

    @Сергей-Стародубов You could have updated when you had the chance but now that NodeBB is several versions ahead with many breaking changes to the DB schemas, it's much harder.


  • Admin

    @PitaJ It shouldn't be impossible though... I've done an upgrade from 0.4.0 era to post 1.x before...



  • @julian said in Update from v0.7.0 to v1.4.0:

    @PitaJ It shouldn't be impossible though... I've done an upgrade from 0.4.0 era to post 1.x before...

    Is it posible directly or just walking step by step through the minor versions?


  • Admin

    Step-by-step, we routinely clear the upgrade script so it doesn't get too bloated.



  • I'm in exactly the same situation, upgrading 0.7.3 nodebb with redis version.
    I cannot find documentation for older version.

    I managed to install the packages using node 0.10.48 and npm 2.15.1

    But redis and connect-redis are not included in package.json and the new versions that I installed manually don;t work.

    Can someone tell me what versions were used in 0.7/0.8 versions?



  • I managed to install and run 0.8 with "redis": "version": "0.12.1", and connect-redis v2.0.0.
    So use those versions of node and npm and you should be fine.
    Pay attention if you use nvm and different users to run the blog! Check the npm and node version with the user that starts the app.



  • Hello everyone,

    I've been enjoying Nodebb for more than 2 years now and I'm running nodebb v.0.6.0 on Digital Ocean and I finally took some time to upgrade to 1.4.0 this weekend.
    I know it was long overdue, but my dog ate my keyboard, life is hard and ninjas stole my computer for 2 years before giving back to me this weekend...

    Anyway, I've been following this
    https://docs.nodebb.org/en/latest/upgrading/index.html
    and this topic
    https://community.nodebb.org/topic/4700/solved-upgrading-nodebb-0-6-0-to-0-7-0/26

    I managed to upgrade from 0.6.0 to 0.6.1 but when I jump to 0.7.x things get messy...
    I have a const error with bluebird, that I'm able to avoid after upgrading node but afterwards, I'm just stuck with my database not connecting or being found when I run ./nodebb upgrade or ./nodebb setup

    I've tried npm install also but it doesn't get me further.

    I'm running node v 0.10.36, npm 1.4.28 and have installed nvm.

    this is what I get when I run ./nodebb dev

    NodeBB v0.7.3 Copyright (C) 2013-2014 NodeBB Inc.
    This program comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to redistribute it under certain conditions.
    For the full license, please visit: http://www.gnu.org/copyleft/gpl.html
    
    Clustering enabled: Spinning up 1 process(es).
    
    12/12 08:27 [21876] - info: Time: Mon Dec 12 2016 08:27:19 GMT-0500 (EST)
    12/12 08:27 [21876] - info: Initializing NodeBB v0.7.3
    12/12 08:27 [21876] - verbose: * using configuration stored in: /root/nodebb/config.json
    12/12 08:27 [21876] - verbose: * using mongo store at 127.0.0.1:27017
    12/12 08:27 [21876] - verbose: * using themes stored in: /root/nodebb/node_modules
    
    /root/nodebb/node_modules/connect-mongo/src/index.js:4
    const Promise = require('bluebird');
    ^^^^^
    12/12 08:27 [21876] - error: Unable to initialize MongoDB! Is MongoDB installed?   Error :Use of const in strict mode.
    12/12 08:27 [21876] - error: SyntaxError: Use of const in strict mode.
        at Module._compile (module.js:439:25)
        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)
        at require (module.js:380:17)
        at Object.<anonymous> (/root/nodebb/node_modules/connect-mongo/index.js:1:80)
        at Module._compile (module.js:456:26)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
    [cluster] Child Process (21876) has exited (code: 0, signal: null)
    

    And this is what I get with ./nodebb upgrade

    1. Bringing base dependencies up to date... OK
    2. Updating NodeBB data store schema.
    
    /root/nodebb/node_modules/connect-mongo/src/index.js:4
    const Promise = require('bluebird');
    ^^^^^
    12/12 08:31 [21928] - error: Unable to initialize MongoDB! Is MongoDB installed? Error :Use of const in strict mode.
    12/12 08:31 [21928] - error: SyntaxError: Use of const in strict mode.
        at Module._compile (module.js:439:25)
        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)
        at require (module.js:380:17)
        at Object.<anonymous> (/root/nodebb/node_modules/connect-mongo/index.js:1:80)
        at Module._compile (module.js:456:26)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
    3. Storing upgrade date in "package.json"... OK
    
                                                     NodeBB Upgrade Complete!
    

    By any chance, is there someone willing to help me out? Even though I don't deserve it since I waited so long to upgrade my nodebb.
    Just remember than when Princess Leia asked for Obiwan's help, he came along.

    0_1481549735167_YTumVQO.gif


  • Admin

    An error with const suggests there is an issue with Node.js being too far out of date to work with NodeBB.



  • Thanks for the quick reply Julian. (when trying to reply I get a flag for spam by Askimet error... and I can't scroll down in the composer to see my whole message, even in zen mode...)

    I manage to get passed that error when I update node, for example to v4.4.3

    but afterwards I'm facing this issue after a ./nodebb setup

    kerberos@0.0.22 install /root/nodebb/node_modules/mongodb/node_modules/kerberos
    (node-gyp rebuild) || (exit 0)
    
    gyp: /root/.node-gyp/4.4.3/common.gypi not found (cwd: /root/nodebb/node_modules/mongodb/node_modules/kerberos) while read                        ing includes of binding.gyp while trying to load binding.gyp
    gyp ERR! configure error
    gyp ERR! stack Error: `gyp` failed with exit code: 1
    gyp ERR! stack     at ChildProcess.onCpExit (/root/nodebb/node_modules/npm/node_modules/node-gyp/lib/configure.js:357:16)
    gyp ERR! stack     at emitTwo (events.js:87:13)
    gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
    gyp ERR! System Linux 3.10.0-123.8.1.el7.x86_64
    gyp ERR! command "/root/.nvm/v4.4.3/bin/node" "/root/nodebb/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebui                        ld"
    gyp ERR! cwd /root/nodebb/node_modules/mongodb/node_modules/kerberos
    gyp ERR! node -v v4.4.3
    gyp ERR! node-gyp -v v2.0.2
    gyp ERR! not ok
    connect-mongo@1.3.2 node_modules/connect-mongo
    └── bluebird@3.4.6
    
    
    mongodb@2.0.55 node_modules/mongodb
    ├── es6-promise@2.1.1
    ├── readable-stream@1.0.31 (string_decoder@0.10.31, isarray@0.0.1, inherits@2.0.3, core-util-is@1.0.2)
    ├── kerberos@0.0.22 (nan@2.4.0)
    └── mongodb-core@1.2.31 (bson@0.4.23)
    12/12 09:28 [25293] - info: [database] Checking database indices.
    Populating database with default configs, if not already set...
    /root/nodebb/node_modules/mongodb/lib/utils.js:98
        process.nextTick(function() { throw err; });
                                      ^
    
    Error: Module did not self-register.
        at Error (native)
        at Object.Module._extensions..node (module.js:434:18)
        at Module.load (module.js:343:32)
        at Function.Module._load (module.js:300:12)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at Object.<anonymous> (/root/nodebb/node_modules/mmmagic/index.js:3:13)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (module.js:343:32)
        at Function.Module._load (module.js:300:12)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at Object.<anonymous> (/root/nodebb/src/file.js:7:12)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
    

    Is there a mongo update that I should be doing before jumping to nodebb v0.7.x ?


  • Admin

    gyp error suggests a problem rebuilding binaries for compiled packages for NodeBB, of which we have none now.

    So uninstall them with npm unl lwip mmmagic then try again.



  • Thanks so much for your time.

    ./nodebb upgrade gives me this

    and ./nodebb setup gives me this

    Which database to use (wotw)
    Configuration Saved OK
    npm WARN peerDependencies The peer dependency kerberos@~0.0 included from mongodb-core will no
    npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
    npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
    
    > kerberos@0.0.22 install /root/nodebb/node_modules/mongodb/node_modules/kerberos
    > (node-gyp rebuild) || (exit 0)
    
    gyp: /root/.node-gyp/4.4.3/common.gypi not found (cwd: /root/nodebb/node_modules/mongodb/node_modules/kerberos) while reading includes of binding.gyp while trying to load binding.gyp
    gyp ERR! configure error
    gyp ERR! stack Error: `gyp` failed with exit code: 1
    gyp ERR! stack     at ChildProcess.onCpExit (/root/nodebb/node_modules/npm/node_modules/node-gyp/lib/configure.js:357:16)
    gyp ERR! stack     at emitTwo (events.js:87:13)
    gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
    gyp ERR! System Linux 3.10.0-123.8.1.el7.x86_64
    gyp ERR! command "/root/.nvm/v4.4.3/bin/node" "/root/nodebb/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /root/nodebb/node_modules/mongodb/node_modules/kerberos
    gyp ERR! node -v v4.4.3
    gyp ERR! node-gyp -v v2.0.2
    gyp ERR! not ok
    npm WARN unmet dependency /root/nodebb/node_modules/prompt requires winston@'0.8.x' but will load
    
    npm WARN unmet dependency /root/nodebb/node_modules/winston,
    npm WARN unmet dependency which is version 0.9.0
    npm WARN unmet dependency /root/nodebb/node_modules/nodebb-plugin-imgur requires winston@'~0.8.3' but will load
    npm WARN unmet dependency /root/nodebb/node_modules/winston,
    npm WARN unmet dependency which is version 0.9.0
    npm WARN unmet dependency /root/nodebb/node_modules/nodebb-plugin-import-mybb requires underscore@'~1.7.0' but will load
    npm WARN unmet dependency /root/nodebb/node_modules/underscore,
    npm WARN unmet dependency which is version 1.8.3
    npm WARN unmet dependency /root/nodebb/node_modules/nodebb-plugin-import-mybb/node_modules/fs-extra requires rimraf@'~2.2.0' but will load
    npm WARN unmet dependency /root/nodebb/node_modules/rimraf,
    npm WARN unmet dependency which is version 2.3.4
    npm WARN unmet dependency /root/nodebb/node_modules/nodebb-plugin-import/node_modules/html-md-optional_window/node_modules/fs-extra requires rimraf@'~2.2.0' but will load
    npm WARN unmet dependency /root/nodebb/node_modules/rimraf,
    npm WARN unmet dependency which is version 2.3.4
    npm WARN unmet dependency /root/nodebb/node_modules/nodebb-plugin-import/node_modules/nodebb-plugin-import-mybb/node_modules/fs-extra requires rimraf@'~2.2.0' but will load
    npm WARN unmet dependency /root/nodebb/node_modules/rimraf,
    npm WARN unmet dependency which is version 2.3.4
    npm WARN unmet dependency /root/nodebb/node_modules/nodebb-plugin-import/node_modules/nodebb-plugin-import-punbb/node_modules/fs-extra requires rimraf@'~2.2.0' but will load
    npm WARN unmet dependency /root/nodebb/node_modules/rimraf,
    npm WARN unmet dependency which is version 2.3.4
    connect-mongo@1.3.2 node_modules/connect-mongo
    └── bluebird@3.4.6
    
    mongodb@2.0.55 node_modules/mongodb
    ├── es6-promise@2.1.1
    ├── readable-stream@1.0.31 (string_decoder@0.10.31, isarray@0.0.1, inherits@2.0.3, core-util-is@1.0.2)
    ├── kerberos@0.0.22 (nan@2.4.0)
    └── mongodb-core@1.2.31 (bson@0.4.23)
    12/12 10:03 [25634] - info: [database] Checking database indices.
    Populating database with default configs, if not already set...
    /root/nodebb/node_modules/mongodb/lib/utils.js:98
        process.nextTick(function() { throw err; });
                                      ^
    
    Error: Cannot find module 'mmmagic'
        at Function.Module._resolveFilename (module.js:325:15)
        at Function.Module._load (module.js:276:25)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at Object.<anonymous> (/root/nodebb/src/file.js:7:12)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (module.js:343:32)
        at Function.Module._load (module.js:300:12)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at Object.<anonymous> (/root/nodebb/src/controllers/uploads.js:12:9)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (module.js:343:32)
        at Function.Module._load (module.js:300:12)
    

Log in to reply
 


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