-
Notifications
You must be signed in to change notification settings - Fork 519
Not working with angular 5 #1385
Comments
It worked fine for me in Angular 5
|
Hi, |
Hi. it seems because of the version of the |
@NazirTemirov can you share your webpack configurations. So we can get an idea about how to fix this. |
webpack.config.vendor.js
|
webpack.config.js
|
package.json
|
your configs gives me following error.
when I turn off the server side prerendering, working without any issues. |
It worked fine for me. |
Yes. that is the extract thing i'm saying. when you turn off the serverside prerendering app will work. |
Thanks @NazirTemirov for the info. Yes, if you want to upgrade to Angular 5, you will need to disable server-side rendering because Angular 5 (at least for production builds) requires it to work in a substantially different way. We're working on an Angular 5 template here: #1288 (comment) |
@SteveSandersonMS How to disable server-side rendering properly? |
You can utilize ngtools/webpack for the browser side and use angular2-template-loader for the server side. Here's my webpack config, which works with Angular 5 and doesn't sacrifice server side rendering.
|
@mak0t0san I tried your config (minus sass stuff) still getting No NgModule metadata found for 'AppModule'. Anything else that you've changed? |
Hello,
I created a new Angular project using the official ASP.NET Core Web Application template in VS2017.
Then i updated angular 4 to Angular 5 using npm.
npm install @angular/{animations,common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router}@5.0.0 ``
At startup i have this error
System.AggregateException occurred HResult=0x80131500 Message=One or more errors occurred. (Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is "5.1.0-beta.0". Error: Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is "5.1.0-beta.0". at Object.<anonymous> (C:\darwinTFS\Car-e\Integration\Car-e.Website\node_modules\@ngtools\webpack\src\index.js:27:11) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.<anonymous> (C:\darwinTFS\Car-e\Integration\Car-e.Website\webpack.config.js:4:46) at Module._compile (module.js:570:32)) Source=<Cannot evaluate the exception source> StackTrace: at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification)at Microsoft.AspNetCore.Builder.WebpackDevMiddleware.UseWebpackDevMiddleware(IApplicationBuilder appBuilder, WebpackDevMiddlewareOptions options)
at Car_e_Website.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in C:\darwinTFS\Car-e\Integration\Car-e.Website\Startup.cs:line 34
Inner Exception 1:
NodeInvocationException: Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is "5.1.0-beta.0".
Error: Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is "5.1.0-beta.0".
at Object. (C:\darwinTFS\Car-e\Integration\Car-e.Website\node_modules@ngtools\webpack\src\index.js:27:11)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\darwinTFS\Car-e\Integration\Car-e.Website\webpack.config.js:4:46)
at Module._compile (module.js:570:32)`
I tried Angular 5 , 5.1.0beta nothing works
Thank you for your help
The text was updated successfully, but these errors were encountered: