Problem with axios header in nuxt.js
📰 Dev.to · puzzle29
Hello, I'm working on a project using nuxt.js that other developers have already worked on. I don't...
Full Article
Title: Problem with axios header in nuxt.js
URL Source: https://dev.to/puzzle29/problem-with-axios-header-in-nuxtjs-kpo
Published Time: 2023-07-01T18:57:08Z
Markdown Content:
[Skip to content](https://dev.to/puzzle29/problem-with-axios-header-in-nuxtjs-kpo#main-content)
[](https://dev.to/)
[Powered by Algolia](https://www.algolia.com/developers/?utm_source=devto&utm_medium=referral)
[Log in](https://dev.to/enter?signup_subforem=1)[Create account](https://dev.to/enter?signup_subforem=1&state=new-user)
## DEV Community
1 Add reaction
1 Like 0 Unicorn 0 Exploding Head 0 Raised Hands 0 Fire
0 Jump to Comments 0 Save Boost
Copy link
Copied to Clipboard
[Share to X](https://twitter.com/intent/tweet?text=%22Problem%20with%20axios%20header%20in%20nuxt.js%22%20by%20%40KKoudogbo%20%23DEVCommunity%20https%3A%2F%2Fdev.to%2Fpuzzle29%2Fproblem-with-axios-header-in-nuxtjs-kpo)[Share to LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fdev.to%2Fpuzzle29%2Fproblem-with-axios-header-in-nuxtjs-kpo&title=Problem%20with%20axios%20header%20in%20nuxt.js&summary=Hello%2C%20%20I%27m%20working%20on%20a%20project%20using%20nuxt.js%20that%20other%20developers%20have%20already%20worked%20on.%20I%20don%27t...&source=DEV%20Community)[Share to Facebook](https://www.facebook.com/sharer.php?u=https%3A%2F%2Fdev.to%2Fpuzzle29%2Fproblem-with-axios-header-in-nuxtjs-kpo)[Share to Mastodon](https://s2f.kytta.dev/?text=https%3A%2F%2Fdev.to%2Fpuzzle29%2Fproblem-with-axios-header-in-nuxtjs-kpo)
[Share Post via...](https://dev.to/puzzle29/problem-with-axios-header-in-nuxtjs-kpo#)[Report Abuse](https://dev.to/report-abuse)
[](https://dev.to/puzzle29)
[puzzle29](https://dev.to/puzzle29)
Posted on Jul 1, 2023
1
# Problem with axios header in nuxt.js
[#vue](https://dev.to/t/vue)[#nuxt](https://dev.to/t/nuxt)[#axios](https://dev.to/t/axios)[#discuss](https://dev.to/t/discuss)
Hello,
I'm working on a project using nuxt.js that other developers have already worked on.
I don't know much about nuxt.js and I'm having a problem that I can't solve.
When I do an `npm run build` then `npm run start` the application works normally, but when I do an `npm run dev` I get errors:
```
TypeError: Cannot read
URL Source: https://dev.to/puzzle29/problem-with-axios-header-in-nuxtjs-kpo
Published Time: 2023-07-01T18:57:08Z
Markdown Content:
[Skip to content](https://dev.to/puzzle29/problem-with-axios-header-in-nuxtjs-kpo#main-content)
[](https://dev.to/)
[Powered by Algolia](https://www.algolia.com/developers/?utm_source=devto&utm_medium=referral)
[Log in](https://dev.to/enter?signup_subforem=1)[Create account](https://dev.to/enter?signup_subforem=1&state=new-user)
## DEV Community
1 Add reaction
1 Like 0 Unicorn 0 Exploding Head 0 Raised Hands 0 Fire
0 Jump to Comments 0 Save Boost
Copy link
Copied to Clipboard
[Share to X](https://twitter.com/intent/tweet?text=%22Problem%20with%20axios%20header%20in%20nuxt.js%22%20by%20%40KKoudogbo%20%23DEVCommunity%20https%3A%2F%2Fdev.to%2Fpuzzle29%2Fproblem-with-axios-header-in-nuxtjs-kpo)[Share to LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fdev.to%2Fpuzzle29%2Fproblem-with-axios-header-in-nuxtjs-kpo&title=Problem%20with%20axios%20header%20in%20nuxt.js&summary=Hello%2C%20%20I%27m%20working%20on%20a%20project%20using%20nuxt.js%20that%20other%20developers%20have%20already%20worked%20on.%20I%20don%27t...&source=DEV%20Community)[Share to Facebook](https://www.facebook.com/sharer.php?u=https%3A%2F%2Fdev.to%2Fpuzzle29%2Fproblem-with-axios-header-in-nuxtjs-kpo)[Share to Mastodon](https://s2f.kytta.dev/?text=https%3A%2F%2Fdev.to%2Fpuzzle29%2Fproblem-with-axios-header-in-nuxtjs-kpo)
[Share Post via...](https://dev.to/puzzle29/problem-with-axios-header-in-nuxtjs-kpo#)[Report Abuse](https://dev.to/report-abuse)
[](https://dev.to/puzzle29)
[puzzle29](https://dev.to/puzzle29)
Posted on Jul 1, 2023
1
# Problem with axios header in nuxt.js
[#vue](https://dev.to/t/vue)[#nuxt](https://dev.to/t/nuxt)[#axios](https://dev.to/t/axios)[#discuss](https://dev.to/t/discuss)
Hello,
I'm working on a project using nuxt.js that other developers have already worked on.
I don't know much about nuxt.js and I'm having a problem that I can't solve.
When I do an `npm run build` then `npm run start` the application works normally, but when I do an `npm run dev` I get errors:
```
TypeError: Cannot read
DeepCamp AI