Nuxt.js: error Generator.afterGenerate (node_modules/@nuxt/generator/dist/generator.js:168:43)

Created on 4 Oct 2019  路  19Comments  路  Source: nuxt/nuxt.js

Version

v2.10.0

Reproduction link

https://nolinks

Steps to reproduce

https://bug.nuxtjs.org/

Have the same issue as well. Just install 2.10.0 and the problem started acting. Node v10.15.3, and all projects with different nuxt version will have this error message.

What is expected ?

no errors during compile

What is actually happening?

stop here

This bug report is available on Nuxt community (#c9863)
bug-report

Most helpful comment

Tested with both yarn and npm (deleted node_modules and lock file) build doesn't work

All 19 comments

I encountered the same problem after updating nuxt to 2.10.0 on a project. Then afterGenerate / renderroute problem was triggered on each build in spa mode, and for ALL my local 's nuxtjs projects in spa mode...
I finally solved this by running a "npm clean cache --force" and npm install.
Looks like update to 2.10.0 did corrupt my npm cache.. Hope this helps

Try to delete lock file and node modules and reinstall. If the error still happens - please provide a reproduction repo with lock file where this error happens for you.

I already tried, but deleting lock file and node modules did not work for me, the solution was to use the "npm clean cache"

i suggest to use yarn, it has less of this kind of problems

i suggest to use yarn, it has less of this kind of problems

yes i confirm, i tried a fresh yarn install and added all my dependencies to test and everything was fine, that's how i found that my package and scripts was correct but, the npm cache was corrupted

I tried with yarn, same error!

ERROR   /dashboard

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

@vinayakkulkarni please provide a full reproduction with lock files

@aldarund : #6519

Yes same with yarn, removed * nodes-modules and package-lock.json, did a clean yarn install, and when running yarn run build, I get exactly the same error.

Instead 'npm run build' use 'npm run generate' - for me works fine

run generate works but we still need to resolve the build issue.

related #6519

Tested with both yarn and npm (deleted node_modules and lock file) build doesn't work

@carlosesquivel-katoo if your issue different from https://github.com/nuxt/nuxt.js/issues/6519 please provide a full reproduction

It's probably the same issue as #6519 @aldarund

It's probably the same issue as #6519 @aldarund

It's the same, just emphasizing that using yarn or npm was the same. I'll wait for the fix to be deployed.

Thanks!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

msudgh picture msudgh  路  3Comments

surmon-china picture surmon-china  路  3Comments

danieloprado picture danieloprado  路  3Comments

lazycrazy picture lazycrazy  路  3Comments

pehbehbeh picture pehbehbeh  路  3Comments