nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

Can't require a file relative to the index.html

Open alexkvazos opened this issue 11 years ago • 0 comments

This is how I am requiring the file from index.html:

  <script>
    require('./daemon/init')();
  </script>

I have a folder called daemon/ in that same place and inside I have the init.js file that looks like this:

module.exports = function() {
  console.log('Daemon starting!');
};

Instead of everything working, the console shows this error when trying to require the file: screen shot 2015-03-13 at 3 03 32 pm

alexkvazos avatar Mar 13 '15 20:03 alexkvazos