Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'renderRoute' of undefined #6513

Closed
jjhesk opened this issue Oct 4, 2019 · 18 comments
Closed

Cannot read property 'renderRoute' of undefined #6513

jjhesk opened this issue Oct 4, 2019 · 18 comments
Labels

Comments

@jjhesk
Copy link

jjhesk commented Oct 4, 2019

I 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.

Cannot read property 'renderRoute' of undefined 18:06:13

at Generator.afterGenerate (node_modules/@nuxt/generator/dist/generator.js:168:43)
@visualfanatic
@ConsoleTVs

This question is available on Nuxt community (#c9862)
@ghost ghost closed this as completed Oct 4, 2019
@ghost ghost added the cmty:question label Oct 4, 2019
@ghost
Copy link

ghost commented Oct 4, 2019

This issue as been imported as question since it does not respect nuxt.js issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/nuxt.js/issues/c9862.

@jjhesk
Copy link
Author

jjhesk commented Oct 4, 2019

same error in here

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

@dkade
Copy link

dkade commented Oct 4, 2019

Same here...

TypeError: Cannot read property 'renderRoute' of undefined
at Generator.generateRoute (.../node_modules/@nuxt/generator/dist/generator.js:222:42)

@kissge
Copy link

kissge commented Oct 5, 2019

Same here.
Looks like a degression caused by 95e043f .
This change blocked server from being initialized (cf. https://github.com/nuxt/nuxt.js/blob/9ad02c4/packages/core/src/nuxt.js#L38-L40).
This looks like an emergent bug as it basically means nuxt build and nuxt generate are not working at all atm, and there's no workaround known (any ideas? cc: @clarkdo @pi0 )
Thanks :)

@vinayakkulkarni
Copy link

yep facing the same issue, trying with yarn, ref: #6514 (comment)

@dkade
Copy link

dkade commented Oct 7, 2019

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.

@thebspin
Copy link

thebspin commented Oct 7, 2019

Same here, only on the build server i can actually build locally.

@tarakeshp
Copy link

I am facing similar in SPA mode
#6526

@saknarak
Copy link

saknarak commented Oct 9, 2019

I'm facing same problem for SPA mode
95e043f

Work around, edit file node_modules/@nuxt/cli/dist/cli-build.js
line 81: change from

    const config = await cmd.getNuxtConfig({ dev: false, server: false, _build: true });

to

    const config = await cmd.getNuxtConfig({ dev: false, _build: true });

now I can nuxt build

@vinayakkulkarni
Copy link

Should be fixed in v2.10.1 since #6525 is now merged.. waiting to run npm up my project(s). ;)

@frederic117
Copy link

still got the error with v2.10.1

@thebspin
Copy link

still got the error with v2.10.1

Works for me, you sure you also actually installed the new version?

@vinayakkulkarni
Copy link

vinayakkulkarni commented Oct 11, 2019

still got the error with v2.10.1

@frederic117 :

npm up && rm -rf node_modules/ package-lock.json && npm i

have you tried this?

@dkade
Copy link

dkade commented Oct 11, 2019

Yes it is fixed!

For yarn check if you have nuxt version pined in package.json, then:

rm -Rf node_modules/ && rm yarn.lock && yarn

@xaviervitali
Copy link

xaviervitali commented Oct 11, 2019

Hi,

i've the same issue i tried

rm -R -force node_modules/
rm yarn.lock
yarn

@frederic117
Copy link

I tried
rm -Rf node_modules/ && rm yarn.lock && yarn
But still the same error 😭

@frederic117
Copy link

FATAL Cannot read property 'renderRoute' of undefined
remote:
remote: at ModuleContainer.cacheRenderer (node_modules/nuxt-ssr-cache/lib/middleware.js:64:30)
remote: at ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:190:34)
remote: at promise.then (node_modules/@nuxt/utils/dist/utils.js:1802:43)
remote: at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:52:5)
remote: at Function.Module.runMain (internal/modules/cjs/loader.js:880:11)
remote: at internal/main/run_main_module.js:21:11

@dkade
Copy link

dkade commented Oct 12, 2019 via email

@danielroe danielroe added the 2.x label Jan 18, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants