Can't find node_modules after deployment : <p><strong>This title might be a bit misleading but please bear with me for a while.</strong></p>

<p>I have made a simple <code>Angular2</code> app on visual studio 2015 and now I have <code>published it on Azure</code>.</p>

<p>Having node_modules in the development environment was perfect but after deploying it shows error saying can't find node_modules.</p>

<p>Here is how I am referring in my development env in <strong><em>index.html</em></strong>-</p>

<pre><code>&lt;!-- Polyfill(s) for older browsers --&gt;
    &lt;script src="/node_modules/core-js/client/shim.min.js"&gt;&lt;/script&gt;
    &lt;script src="/node_modules/zone.js/dist/zone.js"&gt;&lt;/script&gt;
    &lt;script src="/node_modules/reflect-metadata/Reflect.js"&gt;&lt;/script&gt;
    &lt;script src="/node_modules/systemjs/dist/system.src.js"&gt;&lt;/script&gt;
    &lt;script src="/systemjs.config.js"&gt;&lt;/script&gt;
</code></pre>

<p>Its also referred in <strong><em>system.config.js</em></strong>-</p>

<pre><code>/**
* System configuration for Angular 2 samples
* Adjust as necessary for your application needs.
*/
(function(global) {

// map tells the System loader where to look for things
var map = {
'app':                        '/app', // 'dist',

'@angular':                   '/node_modules/@angular',
'angular2-in-memory-web-api': '/node_modules/angular2-in-memory-web-api',
'rxjs':                       '/node_modules/rxjs'
};

// packages tells the System loader how to load when no filename and/or no extension
var packages = {
'app':                        { main: 'main.js',  defaultExtension: 'js' },
'rxjs':                       { defaultExtension: 'js' },
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
};

var ngPackageNames = [
'common',
'compiler',
'core',
'forms',
'http',
'platform-browser',
'platform-browser-dynamic',
'router',
'router-deprecated',
'upgrade',
];

// Individual files (~300 requests):
function packIndex(pkgName) {
packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
}

// Bundled (~40 requests):
function packUmd(pkgName) {
packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
}

// Most environments should use UMD; some (Karma) need the individual index files
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;

// Add package entries for angular packages
ngPackageNames.forEach(setPackageConfig);

// No umd for router yet
packages['@angular/router'] = { main: 'index.js', defaultExtension: 'js' };

var config = {
map: map,
packages: packages
};

System.config(config);

})(this);
</code></pre>

<p>The error makes sense as I have a .gitignore file which doesn't let the node_modules to deploy to server. </p>

<p>Can someone please assist as to how I can run it after deploying and what change could be done with the above references in order to make it work.</p>
