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

Webpack fails to compile updating from beta.4 to beta.5 using angular-cli #174

Closed
daveo1001 opened this issue Feb 10, 2017 · 24 comments · Fixed by #179
Closed

Webpack fails to compile updating from beta.4 to beta.5 using angular-cli #174

daveo1001 opened this issue Feb 10, 2017 · 24 comments · Fixed by #179
Labels
build has pr A PR has been created to address this issue
Milestone

Comments

@daveo1001
Copy link

During ng serve I get:

ERROR in Error encountered resolving symbol values statically. Calling function 'FlexLayoutModule', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in blah/blah/src/app/app.module.ts, resolving symbol AppModule in blah/blah/src/app/app.module.ts

Compiles fine when I change angular/flex-layout back to beta.4.

angular-cli beta 31

Let me know if any additional info would be helpful.

@bkarv
Copy link

bkarv commented Feb 10, 2017

Thanks I had the same issue when I update Angular Cli to 1.0.0-beta.31 and Angular 2.4.7. I confirm reverting flex-layout back to beta.4, resolves the issue.

@joshwiens
Copy link
Contributor

joshwiens commented Feb 10, 2017

screen shot 2017-02-10 at 5 10 56 am

No issues on a fresh repo. I'll need the full log output & if it's public or can be put in a public repo to help reproduce, that would certainly expedite things.

@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Feb 10, 2017

@d3viant0ne - I have discovered real challenges with upgrading CLI to beta.30. It seems the CLI team's recommendation is to start "fresh"... (which seems horrible BTW). And I think this mix of old/new CLI has issues with flex-layout.

I also have no issues with a fresh install of @angular/cli beta.30 and flex-layout beta.5

@joshwiens
Copy link
Contributor

I haven't dared update my current work project to beta.31 yet given the problems I have had in the past.

The best way I have found to do it is run run ng update in the repo, let it overwrite what it wants to and then clean / take in vscode file by file. Less than optimal but effective so far.

@ThomasBurleson
Copy link
Contributor

Closing as "not a flex-layout" issue

@daveo1001
Copy link
Author

daveo1001 commented Feb 10, 2017

New clean angular-cli project from beta.30 with flex-layout beta.5.
image
Same issue.
Here's a new clean angular-cli project from beta.30 with flex-layout beta.4.
image
Works.

Steps to reproduce

  1. global install for angular-cli yarn global add @angular/cli@1.0.0-beta.30 (or 31 or 29)
  2. create a new project ng new my-project
  3. add flex-layout cd my-project yarn add @angular/flex-layout@2.0.0-beta.5 (beta.4 to see it work)
  4. add flex-layout to app.module.ts
  5. ng serve

@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Feb 10, 2017

Here is the issue related to angular-cli beta.30:
angular/angular-cli#4425 (comment)

@daveo1001 - I think this is an issue for angular-cli... not Flex-Layout.

@daveo1001
Copy link
Author

And here it is failing at beta.5 using cli beta.29
image
And working with beta.4
image

@daveo1001
Copy link
Author

@ThomasBurleson looks like a flex-layout issue, guy. It worked yesterday when I was using cli beta 30 and flex-layout beta 4.

What you linked has nothing to do with what I'm experiencing.

@ThomasBurleson
Copy link
Contributor

@daveo1001 - investigating.

@daveo1001
Copy link
Author

@ThomasBurleson thanks!

@ThomasBurleson
Copy link
Contributor

@daveo1001 - I just tried this with a completely new, blank folder... and followed your steps. It works great!

  1. I already have @angular/cli: 1.0.0-beta.30 installed globally
  2. ng init
  3. yarn add @angular/flex-layout
  4. update app.module.ts
import { FlexLayoutModule } from '@angular/flex-layout';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    FlexLayoutModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
  1. run ng serve

All works great.

@daveo1001
Copy link
Author

Son of a bee sting.

I've got the same issue on two different computers.

Windows 10 screwing me, maybe?

@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Feb 10, 2017

Ah... the notorious Windows OS. Yep. Betcha a $10.

BTW, I love that phrase: "Son of a bee sting". I will have to use that in the future. :-)

@daveo1001
Copy link
Author

Busted on Windows 7 too. :/

@daveo1001
Copy link
Author

Quick, @ThomasBurleson let me borrow your computer.

@garyforsterio
Copy link

Not sure if this is any help to anyone but I just got rid of the error by removing the forRoot() method call from the import. So

imports: [
    ...
    FlexLayoutModule.forRoot(),
   ...
  ],

to

imports: [
    ...
    FlexLayoutModule,
    ...
  ],

@edoardoVD
Copy link

edoardoVD commented Feb 10, 2017

Windows 10 version: Ultimate Pro Majestic Supreme .. ..

angular-cli: 1.0.0-beta.24
node: 6.9.2
os: win32 x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/flex-layout: 2.0.0-beta.5
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/compiler-cli: 2.4.7


@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    LayoutModule,
    FlexLayoutModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

When I import FlexLayoutModule = "Unexpected value 'undefined' imported by the module 'AppModule'"

When I remove it from the import = happily ever after...

Was barely going to check out FlexLayout and this happened.. .. :'( sniff .. . .

So.... I ended up setting @angular/flex-layout: 2.0.0-beta.4 to start get intimately acquainted with angular flexLayout

@ThomasBurleson
Copy link
Contributor

@daveo1001
Copy link
Author

@ThomasBurleson does this mean you owe me $100? 😁

ThomasBurleson added a commit that referenced this issue Feb 10, 2017
… ngc+aot

* 'forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
* clarify changes to FlexLayoutModule.forRoot()

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
ThomasBurleson added a commit that referenced this issue Feb 10, 2017
… ngc+aot

* 'forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
* clarify changes to FlexLayoutModule.forRoot()

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
ThomasBurleson added a commit that referenced this issue Feb 10, 2017
*  ‘forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
*  clarify changes to FlexLayoutModule.forRoot()
*  updates dependency to minimum of Angular v2.3.1.

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
@ThomasBurleson ThomasBurleson added has pr A PR has been created to address this issue and removed in-progress labels Feb 10, 2017
ThomasBurleson added a commit that referenced this issue Feb 10, 2017
*  ‘forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
*  clarify changes to FlexLayoutModule.forRoot()
*  updates dependency to minimum of Angular v2.3.1.

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
tinayuangao pushed a commit that referenced this issue Feb 10, 2017
…179)

*  ‘forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
*  clarify changes to FlexLayoutModule.forRoot()
*  updates dependency to minimum of Angular v2.3.1.

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
@ThomasBurleson
Copy link
Contributor

@daveo1001 - It means I owe you $10 (see #174 (comment)). send me your email and I will gift you an iTune card.

@daveo1001
Copy link
Author

@ThomasBurleson emailed!

@edoardoVD
Copy link

Well after a failed attempt of trying to use angular FlexBox last week.. . I decided to give it another shot (in da face.. .)

To get it working, I ended up:

Upgrading FROM @angular-cli: 1.0.0-beta.24 TO @angular/cli: 1.0.0-beta.31
(did not had to upgrade from Windows to MAC.. . . 😄 )
As well follow the instructions on not using FlexLayoutModule.forRoot() JUST use FlexLayoutModule

Cheerio mates 🤓

karlhaas pushed a commit to karlhaas/flex-layout that referenced this issue May 3, 2017
…ngular#179)

*  ‘forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
*  clarify changes to FlexLayoutModule.forRoot()
*  updates dependency to minimum of Angular v2.3.1.

Refs http://github.com/angular/angular#14410
Fixes angular#174, Fixes angular#175, Fixes angular#176, Fixes angular#178.
@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 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build has pr A PR has been created to address this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants