Errors on Update to 1.7.1


  • Community Rep

    @pitaj said in Errors on Update to 1.7.1:

    I don't know what kind of issues you're having. I don't know your setup. I don't visit Mongolassi, I listen and help with issues here. By default, a NodeBB upgrade will not upgrade the emoji-one pack to the new version.

    The upgrade process we use, the only one that we know works, does upgrade it to the latest version during the upgrade process. If we don't do that, things aren't compatible and it breaks. It's "always" been part of a basic upgrade AFAIK. I've been on NodeBB since 0.3, I think. We've never had an upgrade process that didn't keep all plugins at the latest.

    I had already posted that this was the latest on GitHub as requested.


  • Community Rep

    Sorry if I sounded gruff, I've been asked this same thing like four times as if I'm an idiot. I had just been assuming that emoji were not really being addressed and had been ignoring it. But people kept prodding me saying that the latest update was significant and it was expected to maybe work again.

    I can't uninstall it because of the "undefined" problem that NodeBB appears to have without it (also on GitHub). Maybe that's the underlying issue, that NodeBB has a syntax error in the core install and some quotes or something are getting consumed from the emoji code that compete it but leave something broken in the emoji plugin as a result?


  • Global Moderator

    So during the upgrade, you were prompted to upgrade nodebb-plugin-emoji-one to the lastest version and did. Got it. I was referring to that not being done automatically by the upgrade utility.


  • Community Rep

    @pitaj said in Errors on Update to 1.7.1:

    So during the upgrade, you were prompted to upgrade nodebb-plugin-emoji-one to the lastest version and did. Got it. I was referring to that not being done automatically by the upgrade utility.

    Not prompted, per se. AFAIK, and I know people use different processes, the upgrades are only reliable if a full npm update is run during the process. If we try to start NodeBB without doing that, we often get breaks and it can't start. We always update automatically as it is all scripted, so if this changed at some point, we'd not know. We've used the same upgrade script for a few years and, like I said, all I know is that it was required when it was first made and I was unaware of any changes to that requirement.


  • Community Rep

    Meaning our upgrade script runs nodebb upgrade and then npm i, all as part of the script. We can't restart nodebb till that is done. So it is part of the upgrade process not part of the upgrade command.


  • Global Moderator

    @scottalanmiller all that should be necessary to upgrade NodeBB these days:

    • For major upgrades (1.6.x -> 1.7.x)
    git fetch
    git checkout v1.7.x
    git pull
    ./nodebb upgrade
    
    • For minor upgrades (1.7.0 -> 1.7.1)
    git pull
    ./nodebb upgrade
    

    Would you mind sharing your script? If there are other steps they might be causing these issues.

    Edit: this doesn't include restarting nodebb


  • Community Rep

    Not much of a script but here it is...

    git fetch; git pull; ./nodebb stop; npm i; ./nodebb upgrade; npm i; ./nodebb start; ./nodebb log
    

    And for the 1.7.0 to 1.7.1 release we had to switch to this...

    git fetch; git pull; ./nodebb stop; npm i; rm -rf ./node_modules/eslint* ; npm i commander; ./nodebb upgrade; npm i; ./nodebb start; ./nodebb log
    

    Obviously our backups are not in that script, we do that manually (not sure why, actually.) Probably because we backup up to ten minutes ahead of doing the actual update as we can do that without impact and ensure we are at a lull before going down for a few seconds. So we keep it manual. We don't have a copy of the main database that we use for testing, but we have a series of separate sites that run the same code that range from pure test (their own data, but no live users) to insanely low use (users less than once a week) to moderate use but non-business before getting to the big main site. So we use that as our testing profile.


  • Community Rep

    And like you pointed out, we do are git checkout independently rather than in the script. So that we have control and don't jump versions without realizing that we didn't mean to do it.


  • Global Moderator

    I don't know why the eslint issue occurred, it seems to have happened for a couple people. There are a few issues I can see with your script:

    1. git fetch; git pull is redundant, git pull is just shorthand for git fetch && git merge origin/[current branch]
    2. Using semicolons instead of && will ignore errors in previous steps
    3. The first npm i may have errored out when you upgraded to v1.7.0 where we changed how plugins get installed
      In that release we deleted the package.json in our repository, instead using a default package.json which is used to update the locally held package.json. This allows for npm@5 and yarn default install behaviors to be compatible
    4. You shouldn't need the eslint removal or commander install in there
    5. ./nodebb upgrade runs npm i anyways, so you don't need npm i anymore
    6. You can use ./nodebb start -l or ./nodebb slog instead of start then log

  • GNU/Linux

    Had the same problem. Many thanks for the solution!



Suggested Topics

| |