title: Nodejs SyntaxError: Invalid or unexpected
body: <p>In my index.js file, I have this error </p>
  
  <pre><code>C:\Users\Utkarsh\Desktop\LearningNode\notable\app\routes\index.js:1
  (function (exports, require, module, __filename, __dirname) { ��c
                                                                ^
  
  SyntaxError: Invalid or unexpected token
      at createScript (vm.js:80:10)
      at Object.runInThisContext (vm.js:139:10)
      at Module._compile (module.js:607:28)
      at Object.Module._extensions..js (module.js:654:10)
      at Module.load (module.js:556:32)
      at tryModuleLoad (module.js:499:12)
      at Function.Module._load (module.js:491:3)
      at Module.require (module.js:587:17)
      at require (internal/module.js:11:18)
      at Object.&lt;anonymous&gt; (C:\Users\Utkarsh\Desktop\LearningNode\notable\server.js:11:1)
  </code></pre>
  
  <p>The actual contents of index.js is this:</p>
  
  <pre><code>const noteRoutes = require("./note_routes");
  
  module.exports = function(app, db) {
      noteRoutes(app, db);
  }
  </code></pre>
  
  <p>I have checked for weird quotes and directory names. Nothing is working. It seems that the problem is residing in this line.</p>
  
  <pre><code>const noteRoutes = require("./note_routes");
  </code></pre>
  
  <p>Edit:</p>
  
  <p><strong>note_routes.js</strong></p>
  
  <pre><code>module.exports = function(app, db) {
      app.post("./notes", (req, res) =&gt; {
          // We'll create the note here
          res.send("hello");
      })
  }
  </code></pre>
  
  <p>Node version is v8.9.4 </p>
  
  <p>I'm using sublime text 3.</p>