https://github.com/vinayakkulkarni/nuxt-2.10-bug
npm install
npm run build
Nuxt to build all routes and files post build success.
โน Generating pages 18:52:53
ERROR / 18:52:53
TypeError: Cannot read property 'renderRoute' of undefined
at Generator.generateRoute (/Users/vinayak/Development/Personal/nuxt/nuxt-2.10-bug/node_modules/@nuxt/generator/dist/generator.js:222:42)
at /Users/vinayak/Development/Personal/nuxt/nuxt-2.10-bug/node_modules/@nuxt/generator/dist/generator.js:120:24
at async Promise.all (index 0)
at async Generator.generateRoutes (/Users/vinayak/Development/Personal/nuxt/nuxt-2.10-bug/node_modules/@nuxt/generator/dist/generator.js:115:7)
at async Generator.generate (/Users/vinayak/Development/Personal/nuxt/nuxt-2.10-bug/node_modules/@nuxt/generator/dist/generator.js:48:20)
at async Object.run (/Users/vinayak/Development/Personal/nuxt/nuxt-2.10-bug/node_modules/@nuxt/cli/dist/cli-build.js:101:5)
at async NuxtCommand.run (/Users/vinayak/Development/Personal/nuxt/nuxt-2.10-bug/node_modules/@nuxt/cli/dist/cli-command.js:2575:7)
FATAL Cannot read property 'renderRoute' of undefined 18:52:53
at Generator.afterGenerate (node_modules/@nuxt/generator/dist/generator.js:168:43)
at async Generator.generate (node_modules/@nuxt/generator/dist/generator.js:50:5)
at async Object.run (node_modules/@nuxt/cli/dist/cli-build.js:101:5)
at async NuxtCommand.run (node_modules/@nuxt/cli/dist/cli-command.js:2575:7)
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ โ Nuxt Fatal Error โ
โ โ
โ TypeError: Cannot read property 'renderRoute' of undefined โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `nuxt build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/vinayak/.npm/_logs/2019-10-06T13_22_53_417Z-debug.log
Related issues: #6500, #6513 & #6514
Instead 'npm run build' use 'npm run generate' - for me works fine
@kajcula it's not a real solution for the problem
its bug, i`l check what wrong
@aldarund problem its here https://github.com/nuxt/nuxt.js/commit/95e043f1679f9d3bf1f6508282ac0c6ec468f4d8#diff-487be8dbf9747ee9db4e19a779085840R64
server has been set to false
So here it does not exist https://github.com/nuxt/nuxt.js/blob/dev/packages/generator/src/generator.js#L210
The commit that caused this https://github.com/nuxt/nuxt.js/commit/95e043f1679f9d3bf1f6508282ac0c6ec468f4d8
hmm
It affect not only spa mode.
I use universal mode and I have self made page level cache module where i use this.nuxt.renderer - in development everything is ok, but in prod i got TypeError
nuxt.config.js:
modules: [
'~/modules/page-cache',
],
~/modules/page-cache:
module.exports = function cacheRenderer() {
const nuxt = this.nuxt
const cache = makeCache(this.options.cache)
const renderer = nuxt.renderer
const renderRoute = renderer.renderRoute.bind(renderer) //TypeError
...
}
@cron13 it`s different issue. You need to check for renderer to be exist in your module
it's appear only on linux.
Most helpful comment
its bug, i`l check what wrong