title: how to import fromPromise from RxJS 6.2.1 in node 10.4.1
body: <p>I'm trying to use <code>fromPromise</code> in a node.js script following the first example from <a href="https://www.learnrxjs.io/operators/creation/frompromise.html" rel="nofollow noreferrer">https://www.learnrxjs.io/operators/creation/frompromise.html</a> (code also here: <a href="https://jsfiddle.net/btroncone/upy6nr6n/" rel="nofollow noreferrer">https://jsfiddle.net/btroncone/upy6nr6n/</a>)</p>
  
  <p>Since I'm using node 10.4.1, I can't use <code>import</code> but need to use <code>require</code> instead. </p>
  
  <p>I was able to import <code>mergeMap</code> with this line:</p>
  
  <pre><code>var mergeMap = require('rxjs/operators').mergeMap;
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>import { mergeMap } from 'rxjs/operators'; 
  </code></pre>
  
  <p>The problem is to import <code>fromPromise</code>. The example shows this line:</p>
  
  <p><code>import { fromPromise } from 'rxjs/observable/fromPromise';</code></p>
  
  <p>I tried all the following options without success:</p>
  
  <pre><code>var fromPromise = require('rxjs/observable/fromPromise');
  var fromPromise = require('rxjs/observable/fromPromise').fromPromise;
  var fromPromise = require('rxjs/observable');
  var fromPromise = require('rxjs/observable').fromPromise;
  var fromPromise = require('rxjs').fromPromise;
  </code></pre>