Closed theresaport closed 6 years ago
Hello, I struggled with this for weeks, and finally gave up and switched off AOT for the production build. This solved my problem.
This only happens when building with VS 2017?
this is resolved now, as we upgraded everything to angular 5
On Tue, Jul 31, 2018 at 10:20 PM, Chris Geer notifications@github.com wrote:
This only happens when building with VS 2017?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/benbaran/adal-angular4/issues/31#issuecomment-409427351, or mute the thread https://github.com/notifications/unsubscribe-auth/Ah01JDxy2Q6hbtZ61Hw_jXpulUlxW7W3ks5uMRBmgaJpZM4RfOY2 .
ERROR in Metadata version mismatch for module C:/cs/CSM/node_modules/adal-angular4plus/node_modules//core.d.ts, found version 4, expected 3. I am using Visual Studio 2017 along with ASP.net core 2.0 for creating an authentication application using angular4 and adal-angular4plus. I am able to build and run the program without any issues.
The error comes only when I try to 'Publish' using VS 2017.
package.json { "name": "CSM", "private": true, "version": "0.0.0", "scripts": { "test": "karma start ClientApp/test/karma.conf.js" }, "devDependencies": { "@angular/animations": "4.2.5", "@angular/common": "4.2.5", "@angular/compiler": "4.2.5", "@angular/compiler-cli": "4.2.5", "@angular/core": "4.2.5", "@angular/forms": "4.2.5", "@angular/http": "4.2.5", "@angular/platform-browser": "4.2.5", "@angular/platform-browser-dynamic": "4.2.5", "@angular/platform-server": "4.2.5", "@angular/router": "4.2.5", "@ngtools/webpack": "1.5.0", "@types/chai": "4.0.1", "@types/jasmine": "2.5.53", "@types/webpack-env": "1.13.0", "angular2-router-loader": "0.3.5", "angular2-template-loader": "0.6.2", "aspnet-prerendering": "^3.0.1", "aspnet-webpack": "^2.0.1", "awesome-typescript-loader": "3.2.1", "bootstrap": "^3.3.7", "chai": "4.0.2", "css": "2.2.1", "css-loader": "0.28.4", "es6-shim": "0.35.3", "event-source-polyfill": "0.0.9", "expose-loader": "0.7.3", "extract-text-webpack-plugin": "2.1.2", "file-loader": "0.11.2", "font-awesome": "^4.7.0", "html-loader": "0.4.5", "isomorphic-fetch": "2.2.1", "jasmine-core": "2.6.4", "jquery": "3.2.1", "json-loader": "0.5.4", "karma": "1.7.0", "karma-chai": "0.1.0", "karma-chrome-launcher": "2.2.0", "karma-cli": "1.0.1", "karma-jasmine": "1.1.0", "karma-webpack": "2.0.3", "preboot": "4.5.2", "raw-loader": "0.5.1", "reflect-metadata": "0.1.10", "rxjs": "5.4.2", "style-loader": "0.18.2", "to-string-loader": "1.1.5", "typescript": "2.4.1", "url-loader": "0.5.9", "webpack": "2.5.1", "webpack-hot-middleware": "2.18.2", "webpack-merge": "4.1.0", "zone.js": "0.8.12" }, "dependencies": { "@angular/cli": "^1.6.3", "adal-angular4plus": "^1.0.1", "primeng": "^4.1.0" } }
Publish output fragment:
CSM -> C:\cs\CSM\bin\Any CPU\Release\netcoreapp2.0\CSM.dll "dotnet" exec --runtimeconfig "C:\cs\CSM\bin\Any CPU\Release\netcoreapp2.0\CSM.runtimeconfig.json" --depsfile "C:\cs\CSM\bin\Any CPU\Release\netcoreapp2.0\CSM.deps.json" "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.viewcompilation\2.0.1\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll" @"obj\Any CPU\Release\netcoreapp2.0\microsoft.aspnetcore.mvc.razor.viewcompilation.rsp" npm install npm WARN @0.0.43 requires a peer of rxjs@^5.5.2 but none is installed. You must install peer dependencies yourself. up to date in 5.538s
node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod Hash: 206eac77ac26ca4f08fe3a14b3c79dfdd47cacbb Version: webpack 2.5.1 Child Hash: 206eac77ac26ca4f08fe Time: 21443ms Asset Size Chunks Chunk Names 674f50d287a8c48dc19ba404d20fe713.eot 166 kB [emitted] 912ec66d7572ff821749319396470bde.svg 444 kB [emitted] [big] b06871f281fee6b241d60582ae9369b9.ttf 166 kB [emitted] 89889688147bd7575d6327160d64e760.svg 109 kB [emitted] vendor.js 1.72 MB 0 [emitted] [big] vendor vendor.css 917 kB 0 [emitted] [big] vendor
WARNING in ./~/adal-angular4plus/~/@angular/core/esm5/core.js 6541:15-36 Critical dependency: the request of a dependency is an expression
WARNING in ./~/adal-angular4plus/~/@angular/core/esm5/core.js 6561:15-102 Critical dependency: the request of a dependency is an expression Child Hash: 3a14b3c79dfdd47cacbb Time: 21383ms Asset Size Chunks Chunk Names 89889688147bd7575d6327160d64e760.svg 109 kB [emitted] 674f50d287a8c48dc19ba404d20fe713.eot 166 kB [emitted] 912ec66d7572ff821749319396470bde.svg 444 kB [emitted] [big] b06871f281fee6b241d60582ae9369b9.ttf 166 kB [emitted] vendor.js 7.1 MB 0 [emitted] [big] vendor node node_modules/webpack/bin/webpack.js --env.prod Hash: 7c6b35cb9cc073d78bd1e242d2b377746ea93733 Version: webpack 2.5.1 Child Hash: 7c6b35cb9cc073d78bd1 Time: 4151ms Asset Size Chunks Chunk Names main-client.js 115 kB 0 [emitted] main-client
ERROR in Metadata version mismatch for module C:/cs/CSM/node_modules/adal-angular4plus/node_modules/@angular/core/core.d.ts, found version 4, expected 3
ERROR in ./ClientApp/boot.browser.ts Module not found(0,0): Error : Can't resolve './../$$_gendir/ClientApp/app/app.browser.module.ngfactory' in 'C:\cs\CSM\ClientApp' @ ./ClientApp/boot.browser.ts 6:0-95 Child Hash: e242d2b377746ea93733 Time: 4155ms Asset Size Chunks Chunk Names main-server.js 1.81 MB 0 [emitted] [big] main-server
ERROR in Metadata version mismatch for module C:/cs/CSM/node_modules/adal-angular4plus/node_modules/@angular/core/core.d.ts, found version 4, expected 3
ERROR in ./ClientApp/boot.server.ts Module not found(0,0): Error : Can't resolve './../$$_gendir/ClientApp/app/app.server.module.ngfactory' in 'C:\cs\CSM\ClientApp' @ ./ClientApp/boot.server.ts 8:0-94 C:\cs\CSM\CSM.csproj(135,5): Error MSB3073: The command "node node_modules/webpack/bin/webpack.js --env.prod" exited with code 2.
2>Publish failed due to build errors. Check the error list for more details. ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped =======
What I am missing ?
thanks