Angular CLI: 1.6.2
Node: 6.10.0
OS: darwin x64
Angular: 5.1.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.6.2
@angular-devkit/build-optimizer: 0.0.36
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.42
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.2
@schematics/angular: 0.1.11
@schematics/schematics: 0.0.11
typescript: 2.4.2
webpack: 3.10.0
Build fails with the error below:
"ERROR in error TS5055: Cannot write file
'/Users/user/Documents/workspace/test2/src/app/test.js' because it would
overwrite input file. Adding a tsconfig.json file will help organize
projects that contain both TypeScript and JavaScript files. Learn more at
https://aka.ms/tsconfig."
The js file is copied to the out-tsc directory and included in the output bundle.
In Angular 4 JS file is compiled to the output directory specified in the outDir parameter and included in the final bundle.
Same behavior observed.
There is a work in progress PR for this bug in https://github.com/angular/angular-cli/pull/8930.
Same problem with ts + js
@filipesilva Any update on this issue? We have a massive Angular 1 + Angular 5 project, and about 500 source files that are still .js
For some reason the @ngtools/webpack plugin is trying to write out our .js files over themselves when compiling with AOT (even though those .js files are ng1)
Is there perhaps a way we can have the plugin force overwrite these files for the moment (since it's all done in memory anyway), or ignore them?
https://github.com/angular/angular-cli/pull/8930 was merged and should be out in the 1.7 release.
Thanks @filipesilva!
@filipesilva Many thanks. Working fine now.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
@filipesilva Any update on this issue? We have a massive Angular 1 + Angular 5 project, and about 500 source files that are still
.jsFor some reason the
@ngtools/webpackplugin is trying to write out our.jsfiles over themselves when compiling with AOT (even though those.jsfiles are ng1)Is there perhaps a way we can have the plugin force overwrite these files for the moment (since it's all done in memory anyway), or ignore them?