auth0 token: Failed to compile
up vote
0
down vote
favorite
I've been learning Asp.net core and angular from scratch
I am watching a video. And i am sure that i'm following the instructions in the video.
I installed the library using npm
npm install @auth0/angular-jwt
Then i'm having this error
Failed to compile.
../node_modules/@auth0/angular-jwt/index.js
Module not found: Error: Can't resolve '@angular/common/http' in 'C:UsersdevDocumentsVisual Studio 2017ProjectsDatingAppnode_modules@auth0angular-jwt'
What is the cause of it? i re watch the video thrice in order to find what's wrong but i can't solve it.
When i imported the JwtHelperService
the intelisense of the editor i am using pops up
. So im assuming that the JwtHelperService is installed properly.
i also added jwtHelper = new JwtHelperService();
variable
and created a method like this
loggedIn() {
const token = localStorage.getItem('token');
return !this.jwtHelper.isTokenExpired(token);
}
But where does the error came from? How can i solve it?
Update:
Its giving me error when i add a variable
jwtHelper = new JwtHelperService();
Regards,
Ramon
angular angular6 angular2-jwt
add a comment |
up vote
0
down vote
favorite
I've been learning Asp.net core and angular from scratch
I am watching a video. And i am sure that i'm following the instructions in the video.
I installed the library using npm
npm install @auth0/angular-jwt
Then i'm having this error
Failed to compile.
../node_modules/@auth0/angular-jwt/index.js
Module not found: Error: Can't resolve '@angular/common/http' in 'C:UsersdevDocumentsVisual Studio 2017ProjectsDatingAppnode_modules@auth0angular-jwt'
What is the cause of it? i re watch the video thrice in order to find what's wrong but i can't solve it.
When i imported the JwtHelperService
the intelisense of the editor i am using pops up
. So im assuming that the JwtHelperService is installed properly.
i also added jwtHelper = new JwtHelperService();
variable
and created a method like this
loggedIn() {
const token = localStorage.getItem('token');
return !this.jwtHelper.isTokenExpired(token);
}
But where does the error came from? How can i solve it?
Update:
Its giving me error when i add a variable
jwtHelper = new JwtHelperService();
Regards,
Ramon
angular angular6 angular2-jwt
Is this a version conflict between angular-jwt and the version of angular you have installed?
– Kai
Nov 9 at 0:11
Hello Kai. I installed Angular CLI: 6.0.8 Node: 8.12.0 OS: win32 x64 And i installed the angular-jwt 2.0.0 Is this a conflict?
– Ramon bihon
Nov 9 at 0:55
No idea, but I would recommend checking what the peer dependency versions of angular-jwt are
– Kai
Nov 9 at 3:22
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've been learning Asp.net core and angular from scratch
I am watching a video. And i am sure that i'm following the instructions in the video.
I installed the library using npm
npm install @auth0/angular-jwt
Then i'm having this error
Failed to compile.
../node_modules/@auth0/angular-jwt/index.js
Module not found: Error: Can't resolve '@angular/common/http' in 'C:UsersdevDocumentsVisual Studio 2017ProjectsDatingAppnode_modules@auth0angular-jwt'
What is the cause of it? i re watch the video thrice in order to find what's wrong but i can't solve it.
When i imported the JwtHelperService
the intelisense of the editor i am using pops up
. So im assuming that the JwtHelperService is installed properly.
i also added jwtHelper = new JwtHelperService();
variable
and created a method like this
loggedIn() {
const token = localStorage.getItem('token');
return !this.jwtHelper.isTokenExpired(token);
}
But where does the error came from? How can i solve it?
Update:
Its giving me error when i add a variable
jwtHelper = new JwtHelperService();
Regards,
Ramon
angular angular6 angular2-jwt
I've been learning Asp.net core and angular from scratch
I am watching a video. And i am sure that i'm following the instructions in the video.
I installed the library using npm
npm install @auth0/angular-jwt
Then i'm having this error
Failed to compile.
../node_modules/@auth0/angular-jwt/index.js
Module not found: Error: Can't resolve '@angular/common/http' in 'C:UsersdevDocumentsVisual Studio 2017ProjectsDatingAppnode_modules@auth0angular-jwt'
What is the cause of it? i re watch the video thrice in order to find what's wrong but i can't solve it.
When i imported the JwtHelperService
the intelisense of the editor i am using pops up
. So im assuming that the JwtHelperService is installed properly.
i also added jwtHelper = new JwtHelperService();
variable
and created a method like this
loggedIn() {
const token = localStorage.getItem('token');
return !this.jwtHelper.isTokenExpired(token);
}
But where does the error came from? How can i solve it?
Update:
Its giving me error when i add a variable
jwtHelper = new JwtHelperService();
Regards,
Ramon
angular angular6 angular2-jwt
angular angular6 angular2-jwt
edited Nov 9 at 1:32
asked Nov 9 at 0:01
Ramon bihon
367
367
Is this a version conflict between angular-jwt and the version of angular you have installed?
– Kai
Nov 9 at 0:11
Hello Kai. I installed Angular CLI: 6.0.8 Node: 8.12.0 OS: win32 x64 And i installed the angular-jwt 2.0.0 Is this a conflict?
– Ramon bihon
Nov 9 at 0:55
No idea, but I would recommend checking what the peer dependency versions of angular-jwt are
– Kai
Nov 9 at 3:22
add a comment |
Is this a version conflict between angular-jwt and the version of angular you have installed?
– Kai
Nov 9 at 0:11
Hello Kai. I installed Angular CLI: 6.0.8 Node: 8.12.0 OS: win32 x64 And i installed the angular-jwt 2.0.0 Is this a conflict?
– Ramon bihon
Nov 9 at 0:55
No idea, but I would recommend checking what the peer dependency versions of angular-jwt are
– Kai
Nov 9 at 3:22
Is this a version conflict between angular-jwt and the version of angular you have installed?
– Kai
Nov 9 at 0:11
Is this a version conflict between angular-jwt and the version of angular you have installed?
– Kai
Nov 9 at 0:11
Hello Kai. I installed Angular CLI: 6.0.8 Node: 8.12.0 OS: win32 x64 And i installed the angular-jwt 2.0.0 Is this a conflict?
– Ramon bihon
Nov 9 at 0:55
Hello Kai. I installed Angular CLI: 6.0.8 Node: 8.12.0 OS: win32 x64 And i installed the angular-jwt 2.0.0 Is this a conflict?
– Ramon bihon
Nov 9 at 0:55
No idea, but I would recommend checking what the peer dependency versions of angular-jwt are
– Kai
Nov 9 at 3:22
No idea, but I would recommend checking what the peer dependency versions of angular-jwt are
– Kai
Nov 9 at 3:22
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53217943%2fauth0-token-failed-to-compile%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Is this a version conflict between angular-jwt and the version of angular you have installed?
– Kai
Nov 9 at 0:11
Hello Kai. I installed Angular CLI: 6.0.8 Node: 8.12.0 OS: win32 x64 And i installed the angular-jwt 2.0.0 Is this a conflict?
– Ramon bihon
Nov 9 at 0:55
No idea, but I would recommend checking what the peer dependency versions of angular-jwt are
– Kai
Nov 9 at 3:22