In our typescript 2.3.4 project(ionic2 & angular 4) using Visual Code, we are integrating third party "3D-Carousel". We are getting following errors:
typescript error Cannot write file '/projectfolder/src/assets/js/3d-carousel/FWDUltimate3DCarousel.js' because it would overwrite input file.
typescript error Cannot write file '/projectfolder/src/assets/js/3d-carousel/init-3dcarousel.js' because it would overwrite input file.
Following is the component code:
import { Component, ElementRef, NgZone } from '@angular/core';
import { Events } from 'ionic-angular';
import '../../../assets/js/3d-carousel/FWDUltimate3DCarousel.js';
import carousel3d from '../../../assets/js/3d-carousel/init-3dcarousel.js';
@Component({
selector: 'command-3d-Carousel',
templateUrl: 'Cmd3dCarouselWidget.html'
})
export class Cmd3dCarouselWidget {
constructor(public events: Events, private el: ElementRef, private zone: NgZone) {
}
ngAfterViewInit() {
this.zone.runOutsideAngular(() => {
carousel3d(this.el.nativeElement);
});
}
}
Have checked all the suggestions like making "allowJs": true excluding the carousel Js files in tsconfig.json file. Updating typescript versions etc.The issue still persists.
The build process completes sometimes & the app runs(rarely once in a while), but most of the times the app crashes as a result of the above error's(i.e build process fails at "transpile started").
What can i do for fix it ? Thanks in advance!!