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 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)
@cmty cmty bot closed this Oct 4, 2019
@cmty cmty bot added the cmty:question label Oct 4, 2019
@cmty

This comment has been minimized.

Copy link

@cmty cmty bot 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

This comment has been minimized.

Copy link
Author

@jjhesk jjhesk commented Oct 4, 2019

same error in here

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

@dkade

This comment has been minimized.

Copy link

@dkade 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

This comment has been minimized.

Copy link

@kissge 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

This comment has been minimized.

Copy link

@vinayakkulkarni vinayakkulkarni commented Oct 5, 2019

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

@dkade

This comment has been minimized.

Copy link

@dkade 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

This comment has been minimized.

Copy link

@thebspin thebspin commented Oct 7, 2019

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

@tarakeshp

This comment has been minimized.

Copy link

@tarakeshp tarakeshp commented Oct 8, 2019

I am facing similar in SPA mode
#6526

@saknarak

This comment has been minimized.

Copy link

@saknarak 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

This comment has been minimized.

Copy link

@vinayakkulkarni vinayakkulkarni commented Oct 9, 2019

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

@frederic117

This comment has been minimized.

Copy link

@frederic117 frederic117 commented Oct 11, 2019

still got the error with v2.10.1

@thebspin

This comment has been minimized.

Copy link

@thebspin thebspin commented Oct 11, 2019

still got the error with v2.10.1

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

@vinayakkulkarni

This comment has been minimized.

Copy link

@vinayakkulkarni 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

This comment has been minimized.

Copy link

@dkade 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

This comment has been minimized.

Copy link

@xaviervitali xaviervitali commented Oct 11, 2019 — with CMTY

Hi,

i've the same issue i tried

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

@frederic117

This comment has been minimized.

Copy link

@frederic117 frederic117 commented Oct 11, 2019

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

@frederic117

This comment has been minimized.

Copy link

@frederic117 frederic117 commented Oct 11, 2019

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

This comment has been minimized.

Copy link

@dkade dkade commented Oct 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.