Search code examples
javascriptbuildnuxt.jsbuild-error

nuxt.js build: Cannot read property 'renderRoute' of undefined


I'm using laravel-nuxt.

When i'm trying to build the project for deployment i get this error:

 ERROR   /about                                                                                                                                                                                                   

    18:54:52  

TypeError: Cannot read property 'renderRoute' of undefined
    at Generator.generateRoute (C:\Users\myProj\node_modules\@nuxt\generator\dist\generator.js:222:42)
    at Promise.all.routes.splice.map (C:\Users\myProj\node_modules\@nuxt\generator\dist\generator.js:120:24

on all route i have in my "Pages" folder.

I have no clue on how to fix this, and I really appreciate all help I can get!

Tell me what more info you guys need to figure this one out!


Solution

  • I was having the same problem today and went back to nuxt 2.9.0 by changing my package.json file like this

    // "nuxt": "^2.0.0",
    "nuxt": "2.9.0",
    

    after that I hit npm install again and nuxt seems to work again