title: How to access node.js module in RequireJS (AMD) environment?
body: <p>I have a front-end SPA using <code>RequireJS</code> (2.1.14) as module system.  It basically bootstrap and load <code>Backbone.Marionette</code> app.  </p>
  
  <p>In <code>main.js</code>:</p>
  
  <pre><code>require.config ({
    baseUrl: '/js',
    waitSeconds: 200,
    nodeRequire: require,
    paths: {
      jquery: '//cdn/jquery.min',        
      underscore:'//cdn/underscore-min',
      // more plugins
    },
    shim: {
        // shimming stuff
    }
  });
  
  require(['marionette',
      'vent',
      'config/template',
      'app',
      'routers/main'
     ],
  function (Marionette,
        vent,
        Template,
        nrtApp
  ) {
  'use strict';
  
  nrtApp.module ('Public.Main', function (Main, nrtApp, Backbone,Marionette, $, _) {
    nrtApp.start ();
  
    // this is where the error is:
    requirejs (['config'], function (config) {
      if (typeof config !== 'undefined') {config.log ('ok!');}
    });
  
  });
  
  });
  </code></pre>
  
  <p>The issue is, I would like load some <code>npm</code> packages (e.g npm install config) from <code>RequireJS</code> module.  <strong><code>RequireJS</code> can't seem to find npm <code>node_modules</code> directory which is sitting at different directory than <code>RequireJS baseUrl</code> directory</strong>.  </p>
  
  <p>Below is my directory structure:</p>
  
  <pre><code>my_project/
      app/
          public/
              js/
                  main.js
                  app.js
      node_modules/
          config/
  </code></pre>
  
  <p>Below is error message:</p>
  
  <p><a href="https://i.stack.imgur.com/lOAqH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lOAqH.png" alt="script error"></a></p>
  
  <p>It tried to load module from baseUrl directory.</p>
  
  <p>How can I access npm module to from RequireJS module system in my use case?</p>