[Solved] RC2: Error Cannot write file `component.d.ts` because it would overwrite input file


#1

After upgrading to RC2, i did

rm -rf .tmp
rm -rf node_modules
npm install

Project is working fine in browser with ionic serve
But when I do ionic run android to run in device, I get following errors:

[21:14:07]  ionic-app-scripts 0.0.39 
[21:14:07]  build prod started ... 
[21:14:07]  clean started ... 
[21:14:07]  clean finished in 43 ms 
[21:14:07]  copy started ... 
[21:14:08]  ngc started ... 
[21:14:08]  copy finished in 864 ms 
[21:14:14]  lint started ... 
[21:14:24]  Error: Error Cannot write file '/Users/saiy2k/projects/ion/gmobile/.tmp/app/app.component.d.ts' because it 
            would overwrite input file. 
[21:14:24]  Error Cannot write file '/Users/saiy2k/projects/ion/gmobile/.tmp/pages/chat/chat-box.component.d.ts' because 
            it would overwrite input file. 
[21:14:24]  Error Cannot write file '/Users/saiy2k/projects/ion/gmobile/.tmp/pages/event/album-tab.component.d.ts' 
            because it would overwrite input file. 
[21:14:24]  Error Cannot write file '/Users/saiy2k/projects/ion/gmobile/.tmp/pages/event/coordinator.component.d.ts' 
            because it would overwrite input file. 
[21:14:24]  Error Cannot write file '/Users/saiy2k/projects/ion/gmobile/.tmp/pages/event/event-card.component.d.ts' 
            because it would overwrite input file. 
[21:14:24]  Error Cannot write file '/Users/saiy2k/projects/ion/gmobile/.tmp/pages/event/event.service.d.ts' because it 
            would overwrite input file. 
[21:14:24]  Error Cannot write file 
            '/Users/saiy2k/projects/ion/gmobile/.tmp/pages/event/feedback/feedback.component.d.ts' because it would 
            overwrite input file. 
[21:14:24]  Error Cannot write file '/Users/saiy2k/projects/ion/gmobile/.tmp/pages/event/home-tab.component.d.ts' 
            because it would overwrite input file. 
[21:14:24]  Error Cannot write file '/Users/saiy2k/projects/ion/gmobile/.tmp/pages/event/info-tab.component.d.ts' 
            because it would overwrite input file. 

Pls help


#2

Removing all *.d.ts files helped.
compileOnSave was set to false in tsconfig.ts, but still declarations got generated somehow.

Ran this command from src/

find . -type f -name "*.d.ts" -delete