Cannot read property 'headers' of undefined after Nuxt Generate
See original GitHub issueHello,
another error appears after run npm run generate
.
Steps:
-
try create a new nuxt project like:
vue init vuetifyjs/nuxt my-project
thennpm install
oryarn
-
install this
nuxt-i18n
plugin:yarn add nuxt-i18n
then add some configuration tonuxt.config.js
. -
npm run dev
works fine. -
npm run generate
shows many errors: like this:
ROUTE /en/pages/about
TypeError: Cannot read property 'headers' of undefined
- server-bundle.js:5621 module.exports.__webpack_exports__.default
server-bundle.js:5621:43
- server-bundle.js:1902 promisify
server-bundle.js:1902:15
- server-bundle.js:1883 middlewareSeries
server-bundle.js:1883:10
- server-bundle.js:5465 module.exports.__webpack_exports__.default
server-bundle.js:5465:81
-
im sure that the errors from this plugin, i have disabled it from
nuxt.config.js
, and re runnpm run generate
and everything works fine. -
is this plugin works with
npm run generate
?
any help!
<div align="right">This question is available on Nuxt.js community (#c43)</div>Issue Analytics
- State:
- Created 5 years ago
- Comments:31
Top Results From Across the Web
Cannot read property 'headers' of undefined after Nuxt Generate
Hello, another error appears after run npm run generate. Steps: try create a new nuxt project like: vue init vuetifyjs/nuxt my-project then ...
Read more >NuxtJs - Cannot read property 'headers' of undefined
I'm a newbie in NuxtJs. I'm trying to implement an external API Call with axios which I get token and store it on...
Read more >Cannot read property 'headers' of undefined when i run npm ...
Im using nuxtjs when i run npm run generate im getting this message: nuxt:render error occurred when calling nuxtServerInit: Cannot read property 'headers' ......
Read more >NuxtJs - Cannot read property 'headers' of undefined-Vue.js
Acording to Nuxt Docs req is not available on nuxt generate. You should use nuxt build and than nuxt start after that.
Read more >The error of deploying the product developed with nuxtjs to ...
I'm still working on my Nuxt.js skills. Perhaps this might help Cannot read property 'headers' of undefined after Nuxt Generate · Issue #53...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I could solve this problem to check
req
value.Could you get cookie with this. I tried to get cookie from the header, But req is undefinded. that is working in my local, But After deploying to the netlify It didn’t work