I recently tried an upstream merge to discourse master for a forum that hadn’t been updated since last August. The merge worked fine, but when I tried to run the server locally there were several modules that came back as undefined and caused an error when rendering the page.
Has anyone else come across this problem/does anyone have any potential solutions?
It is not running on Docker. I’ve not exactly sure what you mean by how am I trying to run it locally. I cloned down our repo, merged it with discourse’s master branch to get any necessary updates. Migrated it and ran it with rails s. There are a few custom modifications/plugins that were made a year before I picked this up.
I can pinpoint to you exactly where the code is breaking.
When a module is created for ‘plugin-api’ it tries to recursively go through all of its children and create mods for them. On the third child ‘discourse/widgets/post-cooked’, it is fed into this line (line 122) of discourse-loader.
“reified[i] = requireFrom(resolve(dep, name), name);” is called.
when it runs registry[name] it receives an undefined and throws the error crashing the loader.
It seems clear that every single child that contains ‘widgets’ for plugin-api is not included in the registry object and therefore will crash the loader. I’ve tried moving these module names into the ‘Moved_Module’ object at the top of the page and that did not work either.
If you have any ideas, please let me know. Been at this all day.
So if I’m understanding correctly is you just tried to upgrade a production running instance and are now running into these issues? Have you tried migrating the Rails database using rake db:migrate?
How was this production instance installed? We may not be able to help if it wasn’t installed via a supported method.
The discourse we merged with the upstream master branch was a production instance. However, the code in our production instance was a little outdated since we hadn’t merged with Discourse upstream master branch since August of last year.
Step 4) ran a rake admin:create to have access to the forum as an admin
Step 5) ran rails s and started getting those errors.
That is all I have done. Is there any customer service rep that might be able to hop on the phone with me to talk through this? If not, please let me know if you have any thoughts on how to fix.
It sounds like you’ll need to hire someone to convert your fork into plugins. You can post in #marketplace with a description of what changes you’ve made and your budget. You’ve given little description about the changes you’ve made, so it could be an easier job than I imagine, but a wild guess is $2000 to $5000.