title: Node js Syntax error unexpected token?
body: <p>Everything in my code and log4js file seems to be fine and syntactically correct. However, when running my app, I get this following error:</p>
  
  <pre><code>undefined:1
  ?{
  ^
  SyntaxError: Unexpected token ?
  </code></pre>
  
  <p>It happens when I get to this line:</p>
  
  <pre><code>var logFile = 'log4js_' + process.env.NODE_ENV + '.json';
  log4js.configure(logFile);
  </code></pre>
  
  <p>This is my log4js file</p>
  
  <pre><code>{
      "appenders": [
      {
        "type": "console"
      },
      {
        "type": "file",
        "filename": "logs/main.log",
        "maxLogSize": 1024000,
        "category": "main"
      }
      ]
  }
  </code></pre>
  
  <p>I have no idea why it might think there is a "?" character in the beginning, the log4js file has no syntax errors.</p>