Please provide us with the following information:
- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 10
- Versions. Please run
ng --version. If there's nothing outputted, please
run in a Terminal:
node --version
And paste the result here.
node: 5.1.0
angular-cli: 0.0.39
angular: 2.0.0-rc.4
systemjs: 0.19.26
zone.js: 0.6.12
os: win32 x64
- Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.
Create a new angular project with
> ng new _projectname_
Add a new TypeScript file in /src/app/
For example my-service.ts
import { Injectable } from '@angular/core';
@Injectable()
export class MyService { }
import the service in main.ts
import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { MyProjectAppComponent, environment } from './app/';
import { MyService } from './app/my-service';
var service = new MyService();
if (environment.production) {
enableProdMode();
}
bootstrap(MyProjectAppComponent);
ng serve runs fine and the app works, ng serve -prod runs fine too but the app doesn't work. I get a 404 on my-service.ts
-
The log given by the failure. Normally this include a stack trace and some
more information.

-
Mention any other details that might be useful.
I made a stackoverflow question about this too but not a lot of views:
http://stackoverflow.com/questions/38353014/ng-build-prod-404-on-imported-items-in-main-ts
Thanks! We'll be in touch soon.
Windows 10
ng --version. If there's nothing outputted, pleaserun in a Terminal:
node --version
And paste the result here.
node: 5.1.0
angular-cli: 0.0.39
angular: 2.0.0-rc.4
systemjs: 0.19.26
zone.js: 0.6.12
os: win32 x64
do on your code? etc.
Create a new angular project with
> ng new _projectname_Add a new TypeScript file in /src/app/
For example my-service.ts
import the service in main.ts
ng serveruns fine and the app works,ng serve -prodruns fine too but the app doesn't work. I get a 404 on my-service.tsThe log given by the failure. Normally this include a stack trace and some

more information.
Mention any other details that might be useful.
I made a stackoverflow question about this too but not a lot of views:
http://stackoverflow.com/questions/38353014/ng-build-prod-404-on-imported-items-in-main-ts