Error with nodebb-plugin-markdown



  • Hello everyone. I am having some trouble with the markdown plugin. I upgraded to NodeBB version 0.10.2 1.10.2 and in the process, the nodebb-plugin-markdown doesn't want to work properly anymore. When you try to make a post on my forum, the console gives this error:

    0_1541432263914_Screen Shot 2018-11-05 at 10.37.25 AM.png

    My next solution was to try and rebuild NodeBB. I ran ./nodebb build, and then ./nodebb start, and I got the following in my logs:

    at registerHooks (/home/ubuntu/ttk/NodeBB/src/plugins/load.js:183:13)
    at /home/ubuntu/ttk/NodeBB/src/plugins/load.js:141:6
    at /home/ubuntu/ttk/NodeBB/node_modules/async/dist/async.js:3880:24
    at eachOfArrayLike (/home/ubuntu/ttk/NodeBB/node_modules/async/dist/async.js:1069:9)
    

    2018-11-05T15:23:08.911Z [20023] - warn: [plugins] Unable to parse library for: nodebb-plugin-markdown
    2018-11-05T15:23:09.243Z [20023] - info: Routes added
    2018-11-05T15:23:09.250Z [20023] - info: NodeBB Ready
    2018-11-05T15:23:09.256Z [20023] - info: Enabling 'trust proxy'
    2018-11-05T15:23:09.260Z [20023] - info: NodeBB is now listening on: 0.0.0.0:4567
    (node:20023) DeprecationWarning: collection.update is deprecated. Use updateOne, updateMany, or bulkWrite instead.

    Would anyone be able to help me debug this or find a solution so I can use markdown on my site again? I will also note that the Markdown extension in the ACP is not visible or reachable at all either.


  • Global Moderator

    Do you mean 1.10.2 or 0.10.2 (the second of which is quite old).

    What version of Node, npm, database type and version, reverse proxy setup (if applicable). Did you run ./nodebb upgrade and did it complete successfully?


  • Admin

    @dannydk6-0 The error stack trace is missing a few lines, and it seems an error is causing the markdown plugin to be not initialized. Can you post the rest of the error from logs/output.log



  • Thank you for the swift responses!

    @PitaJ I did mean version 1.10.2, I corrected that typo in my original post 🙂

    Below are the specs you requested:

    node: v8.12.0
    npm: v5.8.0
    database: mongo v3.6.6
    reverse proxy: nginx redirect
    

    I am running the NodeBB server on an EC2 instance, and my mongodb database is in mLabs. I ran ./nodebb upgrade with no issues.

    @baris

    I have pulled up the full stack trace and it looks as such:

    2018-11-05T17:42:13.089Z [27061] - ^[[32minfo^[[39m: Initializing NodeBB v1.10.2 http://xx.xx.xx.xx
    2018-11-05T17:42:17.046Z [27061] - ^[[32minfo^[[39m: [socket.io] Restricting access to origin: http://xx.xx.xx.xx:*
    2018-11-05T17:42:17.571Z [27061] - ^[[31merror^[[39m: Error: Cannot find module '../meta'
        at Function.Module._resolveFilename (module.js:548:15)
        at Function.Module._load (module.js:475:25)
        at Module.require (module.js:597:17)
        at Object.<anonymous> (/forum/path/node_modules/nodebb-plugin-markdown/index.js:9:26)
        at Module._compile (module.js:653:30)
        at Object.Module._extensions..js (module.js:664:10)
        at Module.load (module.js:566:32)
        at tryModuleLoad (module.js:506:12)
        at Function.Module._load (module.js:498:3)
        at Module.require (module.js:597:17)
        at require (internal/module.js:11:18)
        at Object.Plugins.requireLibrary (/forum/path/src/plugins.js:43:32)
        at registerHooks (/forum/path/src/plugins/load.js:183:13)
        at /home/ubuntu/ttk/old_forum/src/plugins/load.js:141:6
        at /home/ubuntu/ttk/old_forum/node_modules/async/dist/async.js:3880:24
        at eachOfArrayLike (/home/ubuntu/ttk/old_forum/node_modules/async/dist/async.js:1069:9)
    2018-11-05T17:42:17.572Z [27061] - ^[[33mwarn^[[39m: [plugins] Unable to parse library for: nodebb-plugin-markdown
    2018-11-05T17:42:17.939Z [27061] - ^[[32minfo^[[39m: Routes added
    2018-11-05T17:42:17.945Z [27061] - ^[[32minfo^[[39m: NodeBB Ready
    2018-11-05T17:42:17.951Z [27061] - ^[[32minfo^[[39m: Enabling 'trust proxy'
    2018-11-05T17:42:17.955Z [27061] - ^[[32minfo^[[39m: NodeBB is now listening on: 0.0.0.0:4567
    

  • Admin

    It seems like you have the latest version of the markdown plugin but not the latest code from NodeBB's master branch, which is causing the issue. I suggest pulling the latest code form NodeBB master. That should get rid of the error you are getting. Other option is to downgrade markdown to an earlier version like 8.8.0



  • That did the trick. Now nodebb-plugin-markdown is working great after pulling the latest updates from the NodeBB repository !!!


 

Suggested Topics

| |