Problems node.js module mmmagic

Technical Support
  • Why this module does not work in the latest versions node.js?

    latest version: v0.12.7

    We have to use: v0.10.13

    In newer versions of an error -

    root@xen:/var/www# ./nodebb upgrade

    1. Bringing base dependencies up to date
    2. Updating NodeBB data store schema
      module.js:355
      Module._extensions[extension](this, filename);
      ^
      Error: Module did not self-register.
      at Error (native)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)
      at Module.require (module.js:365:17)
      at require (module.js:384:17)
      at Object.<anonymous> (/var/www/node_modules/mmmagic/index.js:3:13)
      at Module._compile (module.js:460:26)
      at Object.Module._extensions..js (module.js:478:10)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)

    Error: undefined


    What is magic?

  • mmmagic - An async libmagic binding for node.js for detecting content types by data inspection.
    If you've upgraded node then npm rebuild might fix this for you


Suggested Topics


  • 0 Votes
    5 Posts
    620 Views

    @dogs this worked a treat - thanks. For anyone else who might be looking for something similar, here's a simple scroll to top function that you can place into your Custom JS

    // Scroll to top button $(window).on('action:ajaxify.end', function(data) { var btn = $('#btt'); $(window).scroll(function() { if ($(window).scrollTop() > 300) { btn.addClass('show'); } else { btn.removeClass('show'); } }); btn.on('click', function(e) { e.preventDefault(); $('html, body').animate({scrollTop:0}, '300'); }); })

    Then place this into your Custom Header

    <a id="btt"><i class="fas fa-chevron-up"></i></a>

    Obviously, you would need to provide some CSS to style this. An example of this can be found on https://phenomlab.com

  • 0 Votes
    4 Posts
    566 Views

    Problem solved. For this topic to be any usefull at all:

    Run into first problem trying to point and click install 2 nodebb instances( test and the actual) on the same server and obviously, both couldn't listen on the same 4567 port.

    Second, did the second install from the old docs on readthedocs instead of the official ones from nodebb.

    Third, forgot to also add php-fpm directives to my Nginx config. And start Mongodb.

  • 0 Votes
    3 Posts
    705 Views

    Thank you for your answer. I have configured the CORS headers on my reverse proxy (nginx) and it works well now.

    Thank you!

  • 0 Votes
    3 Posts
    1k Views

    Thank you very much! @Giggiux

  • 0 Votes
    3 Posts
    1k Views

    I'm install NodeBB v0.8.2.
    A recent version of nvm.
    For node.js I use node 0.12.x

    And so far works well.

    For details you can inspect package.json of NodeBB : https://github.com/NodeBB/NodeBB/blob/master/package.json#L88