2.x Upgrade results in broken ACP

Unsolved Technical Support
  • So been failing to upgrade to 2.x for a while now. Every so often I give it another go assuming that whatever issues NodeBB has will be fixed but still never works.

    It will build a 2.x build but has always 1 or 2 errors

    ERROR in ./build/public/src/client/chats.js
    Module not found: Error: Can't resolve 'composer/autocomplete' in '/var/www/nodebb/build/public/src/client'
    ERROR in ./build/public/src/modules/persona/quickreply.js
    Module not found: Error: Can't resolve 'composer/autocomplete' in '/var/www/nodebb/build/public/src/modules/persona'
    ERROR in ./build/public/src/modules/topicThumbs.js 65:10-68:12
    Module not found: Error: Can't resolve 'composer' in '/var/www/nodebb/build/public/src/modules'

    But seems like the errors are always different. Have seen sometimes only build errors for admin.js

    Either way the end result is the frontend mostly works but the ACP will never work as admin.min.js is missing giving a 404 error.

    I refuse to accept that NodeBB has had a completely broken build system for 4 months! and so it must be something I am doing wrong.

    I have disabled all plugins so just the persona theme enabled.

    NodeJS v12.22.12
    MongoDB 4.0.28
    CentOS 7
    And literally any 2.x release of NodeBB all the 1.19 releases work perfectly

    Hopefully the is some solution out there as I cant keep out of date forever for security reasons unless NodeBB keep updating 1.19 forever I am going to have to move forum platforms at this rate

  • You need nodebb-plugin-composer-default enabled to get rid of those errors.

  • @baris Fair enough but the issue with the ACP remains. I disabled all the plugins to see if the was a plugin causing the ACP admin.min.js to not be generated

  • Post any errors you are getting during ./nodebb build or grunt If admin.min.js isn't being generated there should be some errors during those commands.

  • @baris Just tried with 2.5.0 and got the following error

    ERROR in ./build/public/scripts-admin.js
    Module not found: Error: Can't resolve 'translate' in '/var/www/nodebb/build/public'

    I do not have grunt on my system? Am I supposed to have it? the CentOS install instructions dont mention it at all nor does the requirements on Github

    My frontend is also very broken since I tried this upgrade. More JS files just not there at all. Downgrading does not help that situation either which is very bad as now my forum is 100% broken after 3 years of running it.

    Lots of requireJS issues for things like bootbox? but the seems to be no useable error message there just JS issues just lots of "uncaught exceptions" but looks like the JS files its trying to load are also 404 errors

    Everything is owned by a nodebb user and I run the build command as that user so should be no permissions errors (but surely that would throw an error anyway)

    I am at loss. Seems very much like NodeBB has just up and died

    Just updated Node to the latest LTS build as while the README.md for NodeBB says v12 and up are supported I was seeing some "unsupported engine" warnings when doing a clean install on the system implying that actually only v14 and up should work? but despite upgrading I am still missing files in the build for both 1.19 and 2.x releases now

    Must be a long standing bug I stupidly deleted the build folder so its not got the old files remaining to make a "functional" forum and a new fresh install is also failing identically

  • Okay I got my forum working again with 1.19 took a restore of the backup database and weeding out some old broken plugins.

    But 2.x even on a clean new database etc install is still VERY broken both the front end and especially the back end have JS issues for me

    So my question is how long will you support 1.19? because 2.x is clearly not a stable build. I understand in the long term it will be better but I dont want to have a fear of upgrading because you guys cant sort out some frontend JS loading issues. Even if I am the only one suffering it seems

    If it helps I am running CentOS 7 with Node v16.17.0 I am running MongoDB 4.0 but the database should not be the issue right?

  • No, you don't need grunt. Some people use that to build instead of just ./nodebb build. Also you're correct about the required Node version, we recommend Node 16 now.

    Anyways, you say you're having issues with a clean install? The same errors in ./nodebb build?

  • @adamxp12 NodeBB v2.x is stable, we've been iterating on it for nearly a month now.

    If you're seeing a broken ACP then you have plugins that have not been updated to accommodate a breaking change. Your best bet is to disable any extra plugins (you can start with the ones that are explicitly marked as incompatible, listed during startup messaging.)

    (Use ./nodebb reset -p pluginname to do that)

  • @PitaJ Am running Node 16. can we get the README.md file updated to reflect this as I was on 12 assuming it was still supported. maybe add a check to the build process to throw a more visible error if the Node version is wrong as it was only some NPM issues that was just warnings that tipped me off on that

    Clean install gives me this error

    ERROR in ./build/public/src/admin/plugins/emoji.js
    Module not found: Error: Can't resolve 'textcomplete' in '/var/www/nodebbtest/build/public/src/admin/plugins'

    thats one of the core plugins too 😐

    Disabling the emoji plugin gives another warning

    WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
      nodebb (348 KiB)
      admin (386 KiB)

    but that is a working ACP finally. Though I am rather annoyed at the introduction of some slight content jumping on the frontpage when it first loads. seems like it uses some JS to calculate the margin needed for the header urgh making progress backwards in 2.x IMO

    @julian As mentioned above I am having issues with a blank install too. My actual install only has a handful of non core plugins but if a blank install is not working right then I see no reason to fight my actual install.

    These are the plugins that came with a fresh install including the broken emoji one

    Active plugins:
            * [email protected] (installed, disabled)
            * [email protected] (installed, enabled)
            * [email protected] (installed, disabled)
            * [email protected] (installed, disabled)
            * [email protected] (installed, disabled)
            * [email protected] (installed, enabled)
            * [email protected] (installed, enabled)
            * [email protected] (installed, disabled)
            * [email protected] (installed, enabled)
            * [email protected] (installed, disabled)
            * [email protected] (installed, enabled)
            * [email protected] (installed, disabled)
            * [email protected] (installed, disabled)
            * [email protected] (installed, enabled)
  • @adamxp12 The emoji issue there is an open PR for https://github.com/NodeBB/nodebb-plugin-emoji/pull/56

    The webpack entry point warning is just a warning, it can be safely ignored.

    The content jumping is a side effect of the fact that we have a top nav. We need to support custom headers if present. There are some things we can do to reduce it.

Suggested Topics

  • 1 Votes
    6 Posts
  • 0 Votes
    2 Posts
  • 0 Votes
    5 Posts
  • 0 Votes
    8 Posts
  • 0 Votes
    4 Posts