angular-cli: 1.0.0-beta-16; ng build --prod fails; either bits in dist are not complete or build fails
Please provide us with the following information:
OS?
Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) windows 7
Versions.
Please run
ng --version. If there's nothing outputted, please run in a Terminal:node --versionand paste the result here: angular-cli: 1.0.0-beta.16 NODE: 6.5.0 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. the app was created using the CLI added components, service
The log given by the failure.
Normally this include a stack trace and some more information. 94% asset optimizationError in bail mode: [default] c:\Dev\angular2showcaseapp
src\app\app.component.ts:5:12 Cannot find name 'require'.
Mention any other details that might be useful.
contents of app.component.ts import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'Angular 2 Rocks hardcore!'; }
Thanks! We'll be in touch soon.
Same issue I am having.. whats your typescript version?
Same issue here. I used this workaround:
npm install @types/node --save-dev
Maybe it should be included in package.json.
fix : in typings.d.ts add: declare var require: any;
Fixed in https://github.com/angular/angular-cli/pull/2528
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.