Skip to content

Strange compiling bug #5469

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

Closed
1 task done
masaanli opened this issue Mar 17, 2017 · 3 comments
Closed
1 task done

Strange compiling bug #5469

masaanli opened this issue Mar 17, 2017 · 3 comments

Comments

@masaanli
Copy link

masaanli commented Mar 17, 2017

Bug Report or Feature Request (mark with an x)

  • bug report

When you change a interface the TSLinter and the Angular CLI are not throwing errors anymore? It happens with different things too. When i run ng serve again for example it works again or it throws errors. But while changing files it seems to remember old stuff..

When you have a file with interfaces and have imported them somewhere else, and then start the project by ng serve it works correctly.
But when already running and reference to a exported interface it stops working.

Versions.

CLI RC2
Node 7.8
YARN/NPM

Repro steps.

Make a interface, couple it to a function

The log given by the failure.

Desired functionality.

Working again, so it needs to throw and error.

Mention any other details that might be useful.

@masaanli
Copy link
Author

Another simple example when it happens:

I had:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { CoreModule } from './core/core.module';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    AppRoutingModule,
    CoreModule.forRoot(),
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

I changed it to:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { CoreModule } from './core/core.module';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    ReactiveFormsModule,
    AppRoutingModule,
    CoreModule.forRoot(),
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Then I save it and cli is auto seeing the changes and gives this error...
Then im getting the error ERROR in /repos/vreugd-online/src/app/app.module.ts (18,5): Cannot find name 'ReactiveFormsModule'.)?

When stop the cli and run ng serve again then it works again.

@filipesilva
Copy link
Contributor

Dupe of #5404, fixed in #5489

@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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants