Comments (14)
Made 2 important changes to the package node_modules folder and things are working now.
- Remove the local "node_modules" folder present inside the "node_modules/adal-angular4".
- Inside "node_modules/adal-angular4" folder adal4.service.js replace:
var rxjs_1 = require("rxjs");
with
var rxjs_1 = require("rxjs/Observable");
from adal-angular4.
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. 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 @angular-devkit/[email protected] 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
from adal-angular4.
Am also stuck with the same thing. @TimeTravelersHackedMe Did you find any workaround?
from adal-angular4.
Found a work around. Delete the local "node_modules" folder present inside the "node_modules/adal-angular4" folder. But now it gives another error :
ERROR in ./node_modules/rxjs/observable/BoundNodeCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
at Object.getEffectiveTypeAnnotationNode (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:9341:17)
at assignContextualParameterTypes (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:41652:25)
at checkFunctionExpressionOrObjectLiteralMethod (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:41948:29)
at checkExpressionWorker (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:42959:28)
at checkExpression (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:42898:42)
at checkExpressionCached (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:42779:38)
at checkReturnStatement (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:45418:54)
at checkSourceElement (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:46763:28)
at Object.forEach (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:1506:30)
at checkBlock (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:44563:16)
at checkSourceElement (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:46742:28)
at checkFunctionExpressionOrObjectLiteralMethodDeferred (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:41990:21)
at checkDeferredNodes (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:46828:25)
at checkSourceFileWorker (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:46863:17)
at checkSourceFile (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:46842:13)
at Object.forEach (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:1506:30)
@ ./node_modules/rxjs/observable/bindNodeCallback.js 2:36-76
@ ./node_modules/rxjs/add/observable/bindNodeCallback.js
@ ./node_modules/rxjs/Rx.js
@ ./node_modules/adal-angular4/adal4.service.js
@ ./src/app/app.module.ngfactory.js
@ ./src/main.ts
@ multi ./src/main.ts
ERROR in ./node_modules/rxjs/observable/BoundCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
at Object.getEffectiveTypeAnnotationNode (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:9341:17)
at assignContextualParameterTypes (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:41652:25)
at checkFunctionExpressionOrObjectLiteralMethod (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:41948:29)
at checkExpressionWorker (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:42959:28)
at checkExpression (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:42898:42)
at checkExpressionCached (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:42779:38)
at checkReturnStatement (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:45418:54)
at checkSourceElement (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:46763:28)
at Object.forEach (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:1506:30)
at checkBlock (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:44563:16)
at checkSourceElement (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:46742:28)
at checkFunctionExpressionOrObjectLiteralMethodDeferred (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:41990:21)
at checkDeferredNodes (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:46828:25)
at checkSourceFileWorker (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:46863:17)
at checkSourceFile (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:46842:13)
at Object.forEach (C:\CP Repo\Git\Iaea.CountryProfiles.Web\node_modules\typescript\lib\typescript.js:1506:30)
@ ./node_modules/rxjs/observable/bindCallback.js 2:32-68
@ ./node_modules/rxjs/add/observable/bindCallback.js
@ ./node_modules/rxjs/Rx.js
@ ./node_modules/adal-angular4/adal4.service.js
@ ./src/app/app.module.ngfactory.js
@ ./src/main.ts
@ multi ./src/main.ts
from adal-angular4.
@Codefearingguy Even I am trying to setup adal in angular 5 and going through the similar errors. After fixing the above 2, I got another error.
ERROR Error: Uncaught (in promise): TypeError: rxjs_1.Observable.bindCallback is not a function
TypeError: rxjs_1.Observable.bindCallback is not a function
at Adal4Service.acquireToken (webpack-internal:///../../../../adal-angular4/adal4.service.js:180)
at AuthHttp.sendRequest (webpack-internal:///../../../../../src/app/shared/services/authhttp.service.ts:82)
at AuthHttp.get (webpack-internal:///../../../../../src/app/shared/services/authhttp.service.ts:34)
at UserInfoService.GetUserRolePermissions (webpack-internal:///../../../../../src/app/shared/services/userinfo.service.ts:61)
at UserInfoService.GetAuthenticatedUserInfo (webpack-internal:///../../../../../src/app/shared/services/userinfo.service.ts:50)
at AuthenticationGuard.canActivate (webpack-internal:///../../../../../src/app/shared/guards/authentication-guard.ts:33)
at MapSubscriber.eval [as project] (webpack-internal:///../../../router/esm5/router.js:3837)
at MapSubscriber._next (webpack-internal:///../../../../rxjs/_esm5/operators/map.js:82)
at MapSubscriber.Subscriber.next (webpack-internal:///../../../../rxjs/_esm5/Subscriber.js:96)
at ArrayObservable._subscribe (webpack-internal:///../../../../rxjs/_esm5/observable/ArrayObservable.js:121)
at Adal4Service.acquireToken (webpack-internal:///../../../../adal-angular4/adal4.service.js:180)
at AuthHttp.sendRequest (webpack-internal:///../../../../../src/app/shared/services/authhttp.service.ts:82)
at AuthHttp.get (webpack-internal:///../../../../../src/app/shared/services/authhttp.service.ts:34)
at UserInfoService.GetUserRolePermissions (webpack-internal:///../../../../../src/app/shared/services/userinfo.service.ts:61)
at UserInfoService.GetAuthenticatedUserInfo (webpack-internal:///../../../../../src/app/shared/services/userinfo.service.ts:50)
at AuthenticationGuard.canActivate (webpack-internal:///../../../../../src/app/shared/guards/authentication-guard.ts:33)
at MapSubscriber.eval [as project] (webpack-internal:///../../../router/esm5/router.js:3837)
at MapSubscriber._next (webpack-internal:///../../../../rxjs/_esm5/operators/map.js:82)
at MapSubscriber.Subscriber.next (webpack-internal:///../../../../rxjs/_esm5/Subscriber.js:96)
at ArrayObservable._subscribe (webpack-internal:///../../../../rxjs/_esm5/observable/ArrayObservable.js:121)
at resolvePromise (webpack-internal:///../../../../zone.js/dist/zone.js:824)
at resolvePromise (webpack-internal:///../../../../zone.js/dist/zone.js:795)
at eval (webpack-internal:///../../../../zone.js/dist/zone.js:873)
at ZoneDelegate.invokeTask (webpack-internal:///../../../../zone.js/dist/zone.js:425)
at Object.onInvokeTask (webpack-internal:///../../../core/esm5/core.js:4816)
at ZoneDelegate.invokeTask (webpack-internal:///../../../../zone.js/dist/zone.js:424)
at Zone.runTask (webpack-internal:///../../../../zone.js/dist/zone.js:192)
at drainMicroTaskQueue (webpack-internal:///../../../../zone.js/dist/zone.js:602)
at
from adal-angular4.
same issue on mine...
please any solution for that
from adal-angular4.
Use https://www.npmjs.com/package/adal-angular4plus -- This is compatible with latest version of angular and ng CLI
from adal-angular4.
@pknetsfd Adding this line in a ts file which is using the library, solved the problem import 'rxjs/add/observable/bindCallback';
Im not saying it is a right solution :(. The library just does not support latest rxJs and ng5
from adal-angular4.
@Subhankar99 adal-angular4plus
gives me this error:
ERROR in node_modules/adal-angular4plus/adal4.service.d.ts(40,25): error TS2503: Cannot find namespace 'adal'.
node_modules/adal-angular4plus/adal4.service.d.ts(48,22): error TS2503: Cannot find namespace 'adal'.
Any idea what I'm missing? Thank you.
from adal-angular4.
@skorunka..not sure. Plz upload your code somewhere so that I can check
from adal-angular4.
@Subhankar99 Hi, unfortunately I cannot, it is a company code. I don't have a time to create a repro git repository at the moment :(.
from adal-angular4.
from adal-angular4.
subhankar99 again you with your plus? I already told you in details where is the problem. Please stop wasting peoples time with some useless stuff. It works in my what is that for an answer first of all?
from adal-angular4.
This has been fixed in the v2 library.
from adal-angular4.
Related Issues (20)
- Not routing to expected route
- automatic token renew redirect to redirecturi HOT 9
- Entire app getting built in the Adal Iframe HOT 3
- Change to AuthenticationContext breaks other packages that depend on angular-adal HOT 1
- "Normal" authentication against back doesn't run HOT 1
- Seamless token refresh HOT 14
- Reply URL with query Params HOT 4
- Customizing response type
- cors problem trying to call secured web api HOT 1
- Infinite loop in Edge while authenticating HOT 2
- Specify OAuth2.0 API version HOT 1
- Silent token renewal
- acquireToken issue HOT 5
- Token renewal operation failed due to timeout [Edge and "autologon"]
- How to Use AdalGuard HOT 1
- Error Inject AdalService with Angular 9 HOT 2
- Issue with Angular 9 HOT 15
- Does this npm support Angular 10? HOT 1
- adal redirects to login page when opening in new tab HOT 1
- Error: A silent sign-in request was sent but no user is signed in
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adal-angular4.