• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Unhandled exception nodehelper.js

Scheduled Pinned Locked Moved Solved Troubleshooting
4 Posts 2 Posters 1.3k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    supersook
    last edited by Dec 27, 2018, 10:59 PM

    Dear MagicMirror community,

    I’m rather new to the node.js, Electron and MagicMirror platforms. While my hardware is in the making, I’m getting myself familiar with the various tools, trying to develop my own module. The ‘head first’ post and the ‘module example’ have been quite helpful so far.

    Now that I’m taking the first steps into making my own module, I’m getting stuck at the point where I’m trying to include the osmosis package.

    I know the osmosis package is working after installation/compiling, since I’m successfully running a separate .js file (in the same folder as my own MM module) with the osmosis package performing the scraping I want. However, once I add a require for the osmosis package into my node_heper, the MagicMirror throws an unhandled exception while initializing this node_helper.

    Since my MagicMirror instance is running using pm2, I’ve managed to pull some debug info from the log:

    Error: The module '/home/pi/MagicMirror/modules/HelloWorld/node_modules/libxmljs/build/Release/xmljs.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 59. This version of Node.js requires
    NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).
    

    Probably an easy fix, but I’m not sure how to proceed with these suggestions.

    Hope to find anyone with more experience on the node.js side that could explain me how to get the versions of MagicMirror and the osmosis package to match?

    1 Reply Last reply Reply Quote 0
    • S Away
      sdetweil
      last edited by Dec 27, 2018, 11:41 PM

      @supersook said in Unhandled exception nodehelper.js:

      NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
      the module (for instance, using npm rebuild or npm install).

      right there. go to the osmosis module folder and type npm rebuild

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Dec 29, 2018, 8:48 PM Reply Quote 0
      • S Offline
        supersook @sdetweil
        last edited by Dec 29, 2018, 8:48 PM

        @sdetweil thanks for your suggestion.

        Unfortunately it was a little more complicated than that. It took some online research, but it basically came down to rebuilding the dependency libxmljs for Electron. I followed the steps as described in the Electron documentation and it works like a charm now.

        S 1 Reply Last reply Dec 29, 2018, 9:21 PM Reply Quote 2
        • S Away
          sdetweil @supersook
          last edited by Dec 29, 2018, 9:21 PM

          @supersook great! Thanks for the feedback. I am sure it will help someone else…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          1 / 1
          • First post
            1/4
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Sam, technical setup by Karsten.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy