Using axios-cookiejar-support with Vue.js on the backend





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















Has anyone used axios-cookiejar-support with Vue.js on the backend?



I'm getting the following error in the Chrome debugger:



Uncaught (in promise) TypeError: axiosCookieJarSupport is not a function



And when I console.log(axiosCookieJarSupport) I see "undefined" when I run the the init code shown on the axios-cookiejar-support site that modifies Axios to support cookies:



const axiosCookieJarSupport = require('axios-cookiejar-support').default;



axiosCookieJarSupport(axios); // <--- error occurs here



Obviously, I tried it with a Node.js console application and it works, and I can console.log axiosCookieJarSupport and I see that it is a function in the console application.



I'm guessing I need to somehow tell Webpack (which I believe Vue.js uses) to preload axios-cookiejar-support, as opposed to just include it in the package.json (which I did), but I'm not sure how to do it.










share|improve this question























  • Did you run "npm install" after adding the line in package.json?

    – Teddy
    Nov 17 '18 at 0:59













  • Yes, I did npm install. Also, in case it matters, I'm running on Windows 10, and successfully using regular Axios (as opposed to axios-cookiejar-support).

    – Max Kislik
    Nov 18 '18 at 14:45











  • Here's what I see in the Chrome debugger:Uncaught (in promise) TypeError: axiosCookieJarSupport is not a function at Object._callee$ (xyzapi.js?d0b1:17) at tryCatch (runtime.js?4a57:62) at Generator.invoke [as _invoke] (runtime.js?4a57:296) at Generator.prototype.(anonymous function) [as next] (webpack-internal:///197:114:21) at step (asyncToGenerator.js?7b11:17) at eval (asyncToGenerator.js?7b11:35) at new Promise (<anonymous>) at new F (_export.js?90cd:36) at eval (asyncToGenerator.js?7b11:14) at Object.init (xyzapi.js?d0b1:17)

    – Max Kislik
    Nov 19 '18 at 15:39




















0















Has anyone used axios-cookiejar-support with Vue.js on the backend?



I'm getting the following error in the Chrome debugger:



Uncaught (in promise) TypeError: axiosCookieJarSupport is not a function



And when I console.log(axiosCookieJarSupport) I see "undefined" when I run the the init code shown on the axios-cookiejar-support site that modifies Axios to support cookies:



const axiosCookieJarSupport = require('axios-cookiejar-support').default;



axiosCookieJarSupport(axios); // <--- error occurs here



Obviously, I tried it with a Node.js console application and it works, and I can console.log axiosCookieJarSupport and I see that it is a function in the console application.



I'm guessing I need to somehow tell Webpack (which I believe Vue.js uses) to preload axios-cookiejar-support, as opposed to just include it in the package.json (which I did), but I'm not sure how to do it.










share|improve this question























  • Did you run "npm install" after adding the line in package.json?

    – Teddy
    Nov 17 '18 at 0:59













  • Yes, I did npm install. Also, in case it matters, I'm running on Windows 10, and successfully using regular Axios (as opposed to axios-cookiejar-support).

    – Max Kislik
    Nov 18 '18 at 14:45











  • Here's what I see in the Chrome debugger:Uncaught (in promise) TypeError: axiosCookieJarSupport is not a function at Object._callee$ (xyzapi.js?d0b1:17) at tryCatch (runtime.js?4a57:62) at Generator.invoke [as _invoke] (runtime.js?4a57:296) at Generator.prototype.(anonymous function) [as next] (webpack-internal:///197:114:21) at step (asyncToGenerator.js?7b11:17) at eval (asyncToGenerator.js?7b11:35) at new Promise (<anonymous>) at new F (_export.js?90cd:36) at eval (asyncToGenerator.js?7b11:14) at Object.init (xyzapi.js?d0b1:17)

    – Max Kislik
    Nov 19 '18 at 15:39
















0












0








0








Has anyone used axios-cookiejar-support with Vue.js on the backend?



I'm getting the following error in the Chrome debugger:



Uncaught (in promise) TypeError: axiosCookieJarSupport is not a function



And when I console.log(axiosCookieJarSupport) I see "undefined" when I run the the init code shown on the axios-cookiejar-support site that modifies Axios to support cookies:



const axiosCookieJarSupport = require('axios-cookiejar-support').default;



axiosCookieJarSupport(axios); // <--- error occurs here



Obviously, I tried it with a Node.js console application and it works, and I can console.log axiosCookieJarSupport and I see that it is a function in the console application.



I'm guessing I need to somehow tell Webpack (which I believe Vue.js uses) to preload axios-cookiejar-support, as opposed to just include it in the package.json (which I did), but I'm not sure how to do it.










share|improve this question














Has anyone used axios-cookiejar-support with Vue.js on the backend?



I'm getting the following error in the Chrome debugger:



Uncaught (in promise) TypeError: axiosCookieJarSupport is not a function



And when I console.log(axiosCookieJarSupport) I see "undefined" when I run the the init code shown on the axios-cookiejar-support site that modifies Axios to support cookies:



const axiosCookieJarSupport = require('axios-cookiejar-support').default;



axiosCookieJarSupport(axios); // <--- error occurs here



Obviously, I tried it with a Node.js console application and it works, and I can console.log axiosCookieJarSupport and I see that it is a function in the console application.



I'm guessing I need to somehow tell Webpack (which I believe Vue.js uses) to preload axios-cookiejar-support, as opposed to just include it in the package.json (which I did), but I'm not sure how to do it.







javascript vue.js axios






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 17 '18 at 0:55









Max KislikMax Kislik

1




1













  • Did you run "npm install" after adding the line in package.json?

    – Teddy
    Nov 17 '18 at 0:59













  • Yes, I did npm install. Also, in case it matters, I'm running on Windows 10, and successfully using regular Axios (as opposed to axios-cookiejar-support).

    – Max Kislik
    Nov 18 '18 at 14:45











  • Here's what I see in the Chrome debugger:Uncaught (in promise) TypeError: axiosCookieJarSupport is not a function at Object._callee$ (xyzapi.js?d0b1:17) at tryCatch (runtime.js?4a57:62) at Generator.invoke [as _invoke] (runtime.js?4a57:296) at Generator.prototype.(anonymous function) [as next] (webpack-internal:///197:114:21) at step (asyncToGenerator.js?7b11:17) at eval (asyncToGenerator.js?7b11:35) at new Promise (<anonymous>) at new F (_export.js?90cd:36) at eval (asyncToGenerator.js?7b11:14) at Object.init (xyzapi.js?d0b1:17)

    – Max Kislik
    Nov 19 '18 at 15:39





















  • Did you run "npm install" after adding the line in package.json?

    – Teddy
    Nov 17 '18 at 0:59













  • Yes, I did npm install. Also, in case it matters, I'm running on Windows 10, and successfully using regular Axios (as opposed to axios-cookiejar-support).

    – Max Kislik
    Nov 18 '18 at 14:45











  • Here's what I see in the Chrome debugger:Uncaught (in promise) TypeError: axiosCookieJarSupport is not a function at Object._callee$ (xyzapi.js?d0b1:17) at tryCatch (runtime.js?4a57:62) at Generator.invoke [as _invoke] (runtime.js?4a57:296) at Generator.prototype.(anonymous function) [as next] (webpack-internal:///197:114:21) at step (asyncToGenerator.js?7b11:17) at eval (asyncToGenerator.js?7b11:35) at new Promise (<anonymous>) at new F (_export.js?90cd:36) at eval (asyncToGenerator.js?7b11:14) at Object.init (xyzapi.js?d0b1:17)

    – Max Kislik
    Nov 19 '18 at 15:39



















Did you run "npm install" after adding the line in package.json?

– Teddy
Nov 17 '18 at 0:59







Did you run "npm install" after adding the line in package.json?

– Teddy
Nov 17 '18 at 0:59















Yes, I did npm install. Also, in case it matters, I'm running on Windows 10, and successfully using regular Axios (as opposed to axios-cookiejar-support).

– Max Kislik
Nov 18 '18 at 14:45





Yes, I did npm install. Also, in case it matters, I'm running on Windows 10, and successfully using regular Axios (as opposed to axios-cookiejar-support).

– Max Kislik
Nov 18 '18 at 14:45













Here's what I see in the Chrome debugger:Uncaught (in promise) TypeError: axiosCookieJarSupport is not a function at Object._callee$ (xyzapi.js?d0b1:17) at tryCatch (runtime.js?4a57:62) at Generator.invoke [as _invoke] (runtime.js?4a57:296) at Generator.prototype.(anonymous function) [as next] (webpack-internal:///197:114:21) at step (asyncToGenerator.js?7b11:17) at eval (asyncToGenerator.js?7b11:35) at new Promise (<anonymous>) at new F (_export.js?90cd:36) at eval (asyncToGenerator.js?7b11:14) at Object.init (xyzapi.js?d0b1:17)

– Max Kislik
Nov 19 '18 at 15:39







Here's what I see in the Chrome debugger:Uncaught (in promise) TypeError: axiosCookieJarSupport is not a function at Object._callee$ (xyzapi.js?d0b1:17) at tryCatch (runtime.js?4a57:62) at Generator.invoke [as _invoke] (runtime.js?4a57:296) at Generator.prototype.(anonymous function) [as next] (webpack-internal:///197:114:21) at step (asyncToGenerator.js?7b11:17) at eval (asyncToGenerator.js?7b11:35) at new Promise (<anonymous>) at new F (_export.js?90cd:36) at eval (asyncToGenerator.js?7b11:14) at Object.init (xyzapi.js?d0b1:17)

– Max Kislik
Nov 19 '18 at 15:39














0






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',
autoActivateHeartbeat: false,
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%2f53347219%2fusing-axios-cookiejar-support-with-vue-js-on-the-backend%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53347219%2fusing-axios-cookiejar-support-with-vue-js-on-the-backend%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

Bressuire

Vorschmack

Quarantine