title: How to use node/npm package (oxford-dictionary) in react native?
body: <p>I am trying to use npm <a href="https://www.npmjs.com/package/oxford-dictionary" rel="nofollow noreferrer">oxford-dictionary</a> package in react-native, I installed
  &quot;npm install oxford-dictioary&quot; and run this file as &quot;node app.js&quot; on a terminal and works fine, However, when I tried to use in react native it doesn't work, can anyone help me what's is the problem. Is it possible to use this api at all with just react-native or I would have to build backend with nodejs ?</p>
  <p>app.js</p>
  <pre><code>var Dictionary = require(&quot;oxford-dictionary&quot;);    
  var config = {
   app_id : &quot;-------&quot;,
   app_key : &quot;--------&quot;,
   source_lang : &quot;en&quot;
  };
        
  var dict = new Dictionary(config);
  
  var props = {
   word: &quot;stupendous&quot;,
  };
  
  
  var oxfordApi = {
  getRovers(){
   var lookup = dict.synonyms(props);
   return fetch(lookup).then((res) =&gt; res.json());
    }
    }
  
  
  
  
  
        import React from 'react';
        import { StyleSheet, Text, View } from 'react-native';
        //import oxfordApi from './oxfordApi';
        import globals from 'node-libs-react-native/globals';
             var Dictionary = require(&quot;oxford-dictionary&quot;);  
             var config = {
             app_id : &quot;-------&quot;,
             app_key : &quot;--------------------------&quot;,
          source_lang : &quot;en&quot;
        };
        
         export default class App extends React.Component {
  
  
       constructor(props) {
        super(props);
         this.state = {
           rovers: []
            }
          }
  
       componentWillMount() {
       var dict = new Dictionary(config);
        var lookup = dict.find(&quot;awesome&quot;);
  
         lookup.then((res) =&gt; {
           this.setState({
             rovers: res.rovers
             })
            });
            }
  
          render() {
          console.log(&quot;Rovers: &quot;, this.state.rovers);
           return (
             &lt;View style={styles.container}&gt;
            &lt;Text&gt;Hello wordl&lt;/Text&gt;
            &lt;/View&gt;
             );
           }
               }
  
         const styles = StyleSheet.create({
        container: {
         flex: 1,
             backgroundColor: '#fff',
            alignItems: 'center',
            justifyContent: 'center',
              },
              });
  </code></pre>
  <p>The result When I run  &quot;run npm ios&quot;</p>
  <p>The package at &quot;node_modules/oxford-dictionary/index.js&quot; attempted to import the Node standard library module &quot;https&quot;. It failed because React Native does not include the Node standard library. Read more at <a href="https://docs.expo.io/versions/latest/introduction/faq.html#can-i-use-nodejs-packages-with-expo" rel="nofollow noreferrer">https://docs.expo.io/versions/latest/introduction/faq.html#can-i-use-nodejs-packages-with-expo</a></p>