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










share|improve this question
























  • 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















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










share|improve this question
























  • 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













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










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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


















  • 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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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





















































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







Popular posts from this blog

Schultheiß

Verwaltungsgliederung Dänemarks

Liste der Kulturdenkmale in Wilsdruff