Saturday, February 18, 2017

Angular2 rollup project errors

Receiving the following error message in the Task Runner Explorer window when rolling up an Angular2 app using Gulp (VisualStudio 2015) 

To fix the following error,
Unhandled promise rejection (rejection id: 1): Error: 'ChartsModule' is not exported by node_modules\ng2-charts\ng2-charts.js
Add the following lines

var charts_module_2 = require('./components/charts/charts');
exports.ChartsModule = charts_module_2.ChartsModule;

Inside of

\node_modules\ng2-charts\ng2-charts.js



To fix the following error,


Unhandled promise rejection (rejection id: 1): Error: 'MapsAPILoader' is not exported by node_modules\angular2-google-maps\core\index.js
Add the following lines:


var core_module_2 = require('./core.umd');
exports.MapsAPILoader = core_module_2.MapsAPILoader;

Inside of

node_modules/angular2-google-maps/core/index.js


For help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module 



To fix the following error,
Unhandled promise rejection (rejection id: 1): Error: 'FileUploader' is not exported by node_modules\ng2-file-upload\index.js
Add the following lines

var file_uploader_module_2 = require('./components/file-upload/file-uploader.class');
exports.FileUploader = file_uploader_module_2.FileUploader;

Inside of

\ node_modules\ng2-file-upload\ng2-file-upload.js (2.2.1)