angular / angular

Deliver web apps with confidence 🚀
https://angular.dev
MIT License
95.73k stars 25.27k forks source link

TS2035 AnimationDriver #15332

Closed j-Cis closed 7 years ago

j-Cis commented 7 years ago

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

ERROR in [at-loader] ./node_modules/angular2-platform-node/node-platform.d.ts:1:10 
TS2305: Module '"C:/dotnet-aspnet-core-angular/node_modules/@angular/platform-browser/platform-browser"' has no exported member 'AnimationDriver'.

ERROR in [at-loader] ./node_modules/angular2-platform-node/node-renderer.d.ts:2:10 
TS2305: Module '"C:/dotnet-aspnet-core-angular/node_modules/@angular/platform-browser/platform-browser"' has no exported member 'AnimationDriver'.

Minimal reproduction of the problem with instructions 0) cloning from https://github.com/CisSasGot/vs2017-angular4-kit-starter/ or 1) IDE: VS2017 Comunity / node 7.7.3 2) in terminal

(PS> dotnet new --install Microsoft.AspNetCore.SpaTemplates::* )
PS> dotnet new angular

3) upgrade from

  @angular/common                        ^2.4.10   →       ^4.0.0-rc.5
  @angular/compiler                      ^2.4.10   →       ^4.0.0-rc.5
  @angular/core                          ^2.4.10   →       ^4.0.0-rc.5
  @angular/forms                         ^2.4.10   →       ^4.0.0-rc.5
  @angular/http                          ^2.4.10   →       ^4.0.0-rc.5
  @angular/platform-browser              ^2.4.10   →       ^4.0.0-rc.5
  @angular/platform-browser-dynamic      ^2.4.10   →       ^4.0.0-rc.5
  @angular/platform-server               ^2.4.10   →       ^4.0.0-rc.5
  @angular/router                        ^3.4.10   →       ^4.0.0-rc.5

4) Open VS2017 and when finish proces compiled i get this error in web browser chome and edge

What is the motivation / use case for changing the behavior? I want to create Angular4 starter for VS2017. (As a basis for further projects)

matsko commented 7 years ago

@chuckjaz can you please have a glance at this to see if it's something relative to how our typescript code is setup?

DzmitryShylovich commented 7 years ago

@CisSasGot

angular2-platform-node

you should use platform-server. More info https://github.com/angular/angular/issues/13822

j-Cis commented 7 years ago

answer to mr. @matsko

I think it lies on the angular side, ...

I created 2 kit's named ng2 and ng4, The difference between them is that one works under 2.4.10 and the other under 4.0.0-rc.5, all the components of the components in both are the same. And this ng4 reports an error but not the VS2017 compiler structure, and in the browser already during the operation.

https://github.com/CisSasGot/vs2017-angular4-kit-starter

answer to ms. @DzmitryShylovich I'm getting ready to change. thank you. I will check and let you know if it helped.


P.s. Maybe you have some other method to combine the benefit of angular-cli with VS2017 otherwise. How to create a working starer angular4 in VS2017

chuckjaz commented 7 years ago

@CisSasGot as @DzmitryShylovich points out, you should be using platform-server with Angular 4.0 as angular2-platform-node is not compatible with 4.0 and has been replaced by platform-server.

/cc: @vikerman

ns8482e commented 7 years ago

@CisSasGot, I had the same issue while upgrading Angular 2 app to Angular 4. I resolved it by changing following in my code.

  1. removing angular2-universal, angular2-universal-polyfills from webppack config
  2. removed platformUniversalDynamic from main.ts and replaced with platformBrowserDynamic.
  3. removed es6-shim and es6-promise from webpack confing and added 'core-js/es6' and 'core-js/es7/reflect' there was no code change required in App.
petarld commented 7 years ago

@ns8482e, I did exactly as you stated, however I am still getting the errors above with webpack.

Used @CisSasGot's solution as a starting point.

idonov commented 7 years ago

any fix for the SPA template yet?

ns8482e commented 7 years ago

Asp.net core team working on to fix the template for dotnet core and vs 2017 at https://github.com/aspnet/JavaScriptServices/issues/800 As workaround use working branch @MarkPieszak created

kgkern01 commented 7 years ago

Any fix to this? I have an existing Angular2 SPA templated NET Core app I am trying to upgrade to Angular 4.1.3 and I've tried all of the above, yet I still get this error.

nukec commented 6 years ago

Any update?

chuckjaz commented 6 years ago

The issue reported was that the application was not update to platform-server. Updating it to platform-server resolved the issue.

If you are having an issue with platform-server please file a new issue that includes a link to a repository that reproduces the issue you are having.

angular-automatic-lock-bot[bot] commented 5 years ago

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.