Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Cannot find module '@angular/platform-browser/src/animate/animation_builder'. #139

Closed

Description

@doczoidberg

runnning yo aspnetcore-spa with Angular2 now throws the error:

ERROR in C:\temp\aspnetu2\node_modules\angular2-universal\dist\node\platform\dom\node_dom_renderer.d.ts
(3,34): error TS2307: Cannot find module '@angular/platform-browser/src/animate/animation_builder'.

and dotnet run:

[Node] Error: Cannot find module '@angular/platform-browser/src/animate/animation_builder'
[Node]     at Function.Module._resolveFilename (module.js:325:15)
[Node]     at Function.Module._load (module.js:276:25)
[Node]     at Module.require (module.js:353:17)
[Node]     at require (internal/module.js:12:17)
[Node]     at Object.<anonymous> (C:\temp\aspnetu2\node_modules\angular2-universal\dist\node\platform\dom\node_dom_renderer.js:24:27)

I think this has to do with angular rc2 release.

Activity

  1. laskoviymishka commented on Jun 16, 2016

    @laskoviymishka
    Contributor

    Seems like animation not suppored for angular2-universal. Does it work well with server render?

  2. doczoidberg commented on Jun 16, 2016

    @doczoidberg
    Author

    how can I check?

  3. laskoviymishka commented on Jun 16, 2016

    @laskoviymishka
    Contributor

    In your index.cshtml remove asp-prerender stuff. Leave just your app tag.
    Before

    <app asp-prerender-module="ClientApp/boot-server"
         asp-prerender-webpack-config="webpack.config.js">Loading...</app>
    

    After

    <app>Loading...</app>
    
  4. doczoidberg commented on Jun 16, 2016

    @doczoidberg
    Author

    that works

  5. doczoidberg commented on Jun 16, 2016

    @doczoidberg
    Author

    publishing gives the error in addition to issue 133

    ERROR in C:\temp\aspnetu2\node_modules\angular2-universal\dist\node\platform\dom\node_dom_renderer.d.ts
    PUBLISH(3,34): Error TS2307: Cannot find module '@angular/platform-browser/src/animate/animation_builder'.
    
  6. ManuelDeLeon commented on Jun 16, 2016

    @ManuelDeLeon

    I got the same error today.

    ERROR in C:\test6\node_modules\angular2-universal\dist\node\platform\dom\node_dom_renderer.d.ts
    (3,34): error TS2307: Cannot find module '@angular/platform-browser/src/animate/animation_builder'.
    

    It happens if you use v2.0.0-rc.2 (which is supposed to be compatible with v2.0.0-rc.1)

    Solved it by pinning the version of angular2 in package.json:

        "@angular/common": "2.0.0-rc.1",
        "@angular/compiler": "2.0.0-rc.1",
        "@angular/core": "2.0.0-rc.1",
        "@angular/http": "2.0.0-rc.1",
        "@angular/platform-browser": "2.0.0-rc.1",
        "@angular/platform-browser-dynamic": "2.0.0-rc.1",
        "@angular/platform-server": "2.0.0-rc.1",
        "@angular/router": "2.0.0-rc.1",
        "@angular/router-deprecated": "2.0.0-rc.1"
    

    @SteveSandersonMS
    Wouldn't it be better to use exact version numbers? As this example shows, compatible versions aren't exactly "compatible".

  7. SteveSandersonMS commented on Jun 21, 2016

    @SteveSandersonMS
    Member

    Thanks for reporting this.

    Wouldn't it be better to use exact version numbers? As this example shows, compatible versions aren't exactly "compatible".

    Unfortunately, yes, that does look like the only clean resolution at the moment :( I've applied this fix (but not yet published the updated packages to NPM - will do so later in case there are more fixes and updates to go out at the same time).

    The use of peerDependencies throughout the Angular 2 packages does make it tricky to find a mutually-compatible combination of dependencies, and it means that allowing version ranges is pretty much a guaranteed losing strategy. At least until Angular 2 ships its final release, we might be stuck manually pinning to specific RC versions. I didn't find a mutually-compatible set of RC2 packages (that includes angular2-universal) yet. We might have to wait for RC3 before that dependency can update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions