title: Meteor.js: How to use a phantom.js?
body: <p>I need to use a phantom with the meteor. If I use a separate script, everything works. If I'm using in with the meteor, I get an error.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React, { Component } from 'react';
  var phantom = require('phantom');
  
  phantom.create().then(function(ph) {
      ph.createPage().then(function(page) {
          page.open('https://stackoverflow.com/').then(function(status) {
              console.log(status);
              page.property('content').then(function(content) {
                  console.log(content);
                  page.close();
                  ph.exit();
              });
          });
      });
  });
  export default class App extends Component {
      render() {
          return (
              &lt;div className="container"&gt;&lt;/div&gt;
          );
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <pre><code>C:\OpenServer\domains\EM-topface-like\node_modules\phantom\lib\phantom.js:53 function createLogger({ logLevel = defaultLogLevel } = {}) { SyntaxError: Unexpected token {
      at exports.runInThisContext (vm.js:53:16)
      at Module._compile (module.js:373:25)
      at Object.Module._extensions..js (module.js:416:10)
      at Module.load (module.js:343:32)
      at Function.Module._load (module.js:300:12)
      at Module.require (module.js:353:17)
      at require (internal/module.js:12:17)
      at Object.&lt;anonymous&gt; (C:\OpenServer\domains\EM-topface-like\node_modules\phantom\lib\index.js:7:16)
      at Module._compile (module.js:409:26)
      at Object.Module._extensions..js (module.js:416:10) Exited with code: 1 Your application is crashing. Waiting for file change.
  </code></pre>
  
  <p>How to fix?</p>