generator-angular2 icon indicating copy to clipboard operation
generator-angular2 copied to clipboard

gulp build:prod error

Open dashng opened this issue 9 years ago • 1 comments

run 'gulp build:prod' error generated on 'bundle:app' task.

The issue occured on finding 'node_modules' folder.

Solution:

''' (function(global) { var paths = { 'npm:': './node_modules/' };

var map = {
    'app': 'app',
    '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
    '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
    '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
    '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
    '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
    '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
    '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
    '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
    'rxjs': 'npm: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' }
};

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

System.config(config);

})(this);

'''

dashng avatar Nov 21 '16 08:11 dashng

change 'node_modules/' to be './node_modules/';

dashng avatar Nov 21 '16 08:11 dashng