Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AoT still compile spec files #2736

Closed
antonybudianto7 opened this issue Oct 17, 2016 · 1 comment · Fixed by #2758
Closed

AoT still compile spec files #2736

antonybudianto7 opened this issue Oct 17, 2016 · 1 comment · Fixed by #2758
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix

Comments

@antonybudianto7
Copy link

antonybudianto7 commented Oct 17, 2016

Please provide us with the following information:

OS?

Linux, Ubuntu

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.17
node: 6.7.0
os: linux x64

Repro steps.

angular/angular#11276

  1. Generate new project
ng new test-app
  1. Open app.component.spec.ts
    and add RouterTestingModule
import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';

describe('App: TestBug', () => {
  beforeEach(() => {
    TestBed.configureTestingModule({
      declarations: [
        AppComponent
      ],
      imports: [
        RouterTestingModule
      ]
    });
  });
  1. Then try build
ng build -prod -aot
  1. Breaks
$ ng build -prod -aot                                                                              
Could not start watchman; falling back to NodeWatcher for file system events.                      
Visit http://ember-cli.com/user-guide/#watchman for more info.                                     
  0% compilingparameters received {"filePath":"/home/antony-budianto/Desktop/personal-project/test-
bug/node_modules/@angular/common/src/location/location.d.ts","name":"Location"} which is not a Stat
icSymbol                                                                                           
Error: parameters received {"filePath":"/home/antony-budianto/Desktop/personal-project/test-bug/nod
e_modules/@angular/common/src/location/location.d.ts","name":"Location"} which is not a StaticSymbo
l 

I know the issue about symbol already fixed in 2.1.0, but cli still compile spec files

Current workaround:

  • Add **/*.spec.ts to exclude option in src/tsconfig.json

The log given by the failure.

Please see angular/angular#11276

Mention any other details that might be useful.

AoT should not compile spec files


Thanks! We'll be in touch soon.

@filipesilva filipesilva added type: bug/fix command: build P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful labels Oct 17, 2016
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants