Skip to content

Setting up a beta NodeBB v3 environment

Moved Let's Build It
  • With NodeBB v3 on the horizon, I thought it would make sense for me to provide a guide on how to upgrade an existing (or newly built - up to you) environment to v3.beta1

    This guide assumes you already have a v2 test environment functional and are looking to upgrade to v3.

    Let’s start:

    First, ensure your nodebb instance has been stopped 🙂

    • Type npm config set legacy-peer-deps true
    • cd /path/to/your/nodebb
    • Type git rev-parse HEAD (save this value in case you need to roll back)
    • Type git fetch && git checkout bootstrap5
    • Type git reset --hard v3.0.0-beta.1
    • Type ./nodebb upgrade -mi

    Now upgrade all your plugins to the latest version if available

    • Type ./nodebb build

    As this will be a beta system, there will be frequent updates for the Harmony theme which will present themselves in the usual place (ACP -> Install Plugins - Out of Date). These should be installed in the usual fashion, although along with these updates, you will need to perform a git fetch and git pull of the bootstrap5 repository as it will shown as several releases behind.

    Once you’ve updated the Harmony theme as below

    dd590fb2-b062-4c3e-bc81-a4d715583aef-image.png

    • Type git fetch && git pull

    You’ll see the import of a number of changed files

    f0e3575c-b25d-4882-aeaf-5a6007ad984b-image.png

    • Type ./nodebb build && ./nodebb restart

    1039231a-efd0-4def-a2f0-99ee0597866e-image.png

    You can ignore the warnings for now.

    Enjoy the updated instance.

  • @phenomlab Let me know if you come across any issues. Happy to help.

  • phenomlabundefined phenomlab referenced this topic on
  • @phenomlab anyway this is a beta version, as you said before to me some things not working properly.

  • @cagatay Correct. I’ve adjusted the title accordingly to reflect that.

  • I have a Captcha bug after upgrade on login connexion.

    Without that, impossible to connect to nodebb due to captcha bug

    ff6d945e-fccd-46c8-a03a-b924e50a15fb-image.png

  • @DownPW that’s not a bug as it works fine on my Dev install.

    Screenshot_2023-01-27-21-52-37-75_e4424258c8b8649f6e67d283a50a2cbc.jpg

    Anything in the console?

  • @phenomlab I have rebuild and it’s OK now.

    odd but it’s a beta i guess 😉

  • Have you have test many plugins ? or have you list of incompatibility plugins for now ?

  • @DownPW I’ve tested most of them. The polls plugin doesn’t seem to work from what I can see but others are fully functional. I need to perform a full audit though as I’ve mostly focused on the Swatch code.

  • and you upgrade via cli your plugin ?

    I have this with acp on all plugins to update :

    ee3f0fed-b829-45d5-a442-4b17b6bcbfb2-image.png

    2023-01-27T22:02:49.046Z [4567/1606] - error: admin.plugins.upgrade
    Error: Command failed: npm install nodebb-plugin-tenor-gif@3.0.0 --save
    npm ERR! code ERESOLVE
    npm ERR! ERESOLVE could not resolve
    npm ERR! 
    npm ERR! While resolving: @nodebb/nodebb-plugin-reactions@1.0.2
    npm ERR! Found: nodebb-plugin-emoji@5.0.3
    npm ERR! node_modules/nodebb-plugin-emoji
    npm ERR!   peer nodebb-plugin-emoji@"^5.0.0" from nodebb-plugin-emoji-android@4.0.0
    npm ERR!   node_modules/nodebb-plugin-emoji-android
    npm ERR!     nodebb-plugin-emoji-android@"4.0.0" from the root project
    npm ERR!   nodebb-plugin-emoji@"5.0.3" from the root project
    npm ERR! 
    npm ERR! Could not resolve dependency:
    npm ERR! peer nodebb-plugin-emoji@"^4.0.0" from @nodebb/nodebb-plugin-reactions@1.0.2
    npm ERR! node_modules/@nodebb/nodebb-plugin-reactions
    npm ERR!   @nodebb/nodebb-plugin-reactions@"^1.0.2" from the root project
    npm ERR! 
    npm ERR! Conflicting peer dependency: nodebb-plugin-emoji@4.0.6
    npm ERR! node_modules/nodebb-plugin-emoji
    npm ERR!   peer nodebb-plugin-emoji@"^4.0.0" from @nodebb/nodebb-plugin-reactions@1.0.2
    npm ERR!   node_modules/@nodebb/nodebb-plugin-reactions
    npm ERR!     @nodebb/nodebb-plugin-reactions@"^1.0.2" from the root project
    npm ERR! 
    npm ERR! Fix the upstream dependency conflict, or retry
    npm ERR! this command with --force, or --legacy-peer-deps
    npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
    npm ERR! 
    npm ERR! See /root/.npm/eresolve-report.txt for a full report.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /root/.npm/_logs/2023-01-27T22_02_45_967Z-debug-0.log
    
        at ChildProcess.exithandler (node:child_process:419:12)
        at ChildProcess.emit (node:events:513:28)
        at maybeClose (node:internal/child_process:1091:16)
        at ChildProcess._handle.onexit (node:internal/child_process:302:5)
        at Process.callbackTrampoline (node:internal/async_hooks:130:17)
    

    Exemple here for update this plugin must to test :

    npm install nodebb-plugin-tenor-gif@3.0.0
    

    ?

  • @phenomlab

    Ok like pitaj said on nodebb communauty i have test this :

    npm config set legacy-peer-deps true
    

    and the plugins is installed without error on ACP

    Maybe add this on your first topic 😉

  • @DownPW good call. Will get that added.

  • Thanks for the guide, got my v3 environment running. 🙂

  • @dave1904 excellent news. Thanks for the feedback

  • phenomlabundefined phenomlab moved this topic from Guides on

  • 3 Votes
    5 Posts
    112 Views

    @crazycells Agreed. It takes a more sensible approach. Nobody ever upvotes the first post - it’s usually much further down as the conversation progresses.

  • 15 Votes
    51 Posts
    2k Views

    Oh yes, that’s what’s super cool, I learn something every day. Afterwards I start from so low in JS

  • 19 Votes
    35 Posts
    2k Views

    @DownPW said in Threaded chat support for NodeBB:

    Better like this : add shadow and border-left on self answer

    Of course - you style to your own requirements and taste 🙂 I’ll commit that CSS we discussed yesterday also

  • Nodebb design

    Solved General
    2
    1 Votes
    2 Posts
    144 Views

    @Panda said in Nodebb design:

    One negative is not being so good for SEO as more Server side rendered forums, if web crawlers dont run the JS to read the forum.

    From recollection, Google and Bing have the capability to read and process JS, although it’s not in the same manner as a physical person will consume content on a page. It will be seen as plain text, but will be indexed. However, it’s important to note that Yandex and Baidu will not render JS, although seeing as Google has a 90% share of the content available on the web in terms of indexing, this isn’t something you’ll likely lose sleep over.

    @Panda said in Nodebb design:

    The “write api” is preferred for server-to-server interactions.

    This is mostly based around overall security - you won’t typically want a client machine changing database elements or altering data. This is why you have “client-side” which could be DOM manipulation etc, and “server-side” which performs more complex operations as it can communicate directly with the database whereas the client cannot (and if it can, then you have a serious security flaw). Reading from the API is perfectly acceptable on the client-side, but not being able to write.

    A paradigm here would be something like SNMP. This protocol exists as a UDP (UDP is very efficient, as it is “fire and forget” and does not wait for a response like TCP does) based service which reads performance data from a remote source, thus enabling an application to parse that data for use in a monitoring application. In all cases, SNMP access should be “RO” (Read Only) and not RW (Read Write). It is completely feasible to assume complete control over a firewall for example by having RW access to SNMP and then exposing it to the entire internet with a weak passphrase.

    You wouldn’t do it (at least, I hope you wouldn’t) and the same ethic applies to server-side rendering and the execution of commands.

  • Composer Zen icon?

    Solved Configure
    8
    2 Votes
    8 Posts
    202 Views

    @DownPW exactly. Not really a new concept, and in all honesty, not something I’ve ever used.

    If you consider the need to add links and references, or citations, you’d need to be able to see other parts of the screen!

  • 20 Votes
    110 Posts
    9k Views

    @crazycells said in Setup OGProxy for use in NodeBB:

    are they cached for each user separately?

    No. It’s a shared cache

    @crazycells said in Setup OGProxy for use in NodeBB:

    additionally, this is also handling youtube videos etc, right?

    No. This is handled by nodebb-plugin-ns-embed

  • Smart Widgets

    Solved Configure
    9
    3 Votes
    9 Posts
    312 Views

    @Panda said in Smart Widgets:

    So why is that, or conversely why would the function to expose username ever be required, as it seems app.user is already an available global object?

    It is, yes, but not if you are using it outside of a widget. The function I wrote is also historical and comes from the 2.x train 🙂

  • Further Widgets question

    Solved Configure
    4
    1 Votes
    4 Posts
    148 Views

    @Panda category is for a category in its own, so for example, “fruit” whereas categories is the page that contains all categories as a list.