-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
OS?
Windows 10
Versions.
angular-cli: 1.0.0-beta.24
node: 6.9.1
os: win32 x64
@angular/common: 2.4.3
@angular/compiler: 2.4.3
@angular/core: 2.4.3
@angular/forms: 2.4.3
@angular/http: 2.4.3
@angular/platform-browser: 2.4.3
@angular/platform-browser-dynamic: 2.4.3
@angular/router: 3.4.3
@angular/compiler-cli: 2.4.3
Repro steps.
ng init
a new app.- Create a subdir under
src/app
and cd into it ng g c test-comp
- Edit the
test-comp.component.spec.ts
file to includeimport { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
(This is somewhat arbitrary - I just know this particular module breaks AOT.) - run
ng build -prod --aot
You'll get an error (see the log).
Note that if you do this directly under src/app
you won't get an error, because the spec file is correctly excluded from the AOT build.
I believe the culprit is here:
.replace(/\*/g, '(?:[^/]*)') |
The single-star replacement looks like it's clobbering the previous double-star replacement so you go from **/*\.spec\.ts
after line 120 to (?:.*)/*\.spec\.ts
after line 122 to (?:.(?:[^/]*))/(?:[^/]*)\.spec\.ts
after line 124, when you probably actually want (?:.*)/(?:[^/]*)\.spec\.ts
.
The log given by the failure.
ERROR in Error encountered resolving symbol values statically. Calling function 'NoOpAnimationDriver', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AnimationDriver.NOOP in C:/wsecug it/ng-cli-beta-24/node_modules/@angular/platform-browser/src/dom/animation_driver.d.ts, resolving symbol BrowserTestingModule in C:/wsecugit/ng-cli-beta-24/node_modules/@angular/platform-browser/testing/browser.d.ts, resolving symbol BrowserTestingModule in C:/wsecugit/n g-cli-beta-24/node_modules/@angular/platform-browser/testing/browser.d.ts