Skip to content

Error on sub-pages in dev-mode #144

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

Closed
peXed opened this issue Apr 18, 2018 · 2 comments
Closed

Error on sub-pages in dev-mode #144

peXed opened this issue Apr 18, 2018 · 2 comments

Comments

@peXed
Copy link

peXed commented Apr 18, 2018

Hello!

I followed the guid but always get the following error as soon as I create a subsite (in a subfolder) and try to open it.

Error in render: "TypeError: Cannot read property 'path' of undefined"

I looked into the issue and it seems the $page variable doesn't get set correctly, before the Content-Component gets inserted.
With the default theme, you get a slightly different error:

Error in render: "TypeError: Cannot read property 'frontmatter' of undefined"

If I build the project, everything works great and the output looks correct.

I'm on Windows 10.

Here is a small test repo: https://github.com/peXed/vuepress-test

@yyx990803
Copy link
Member

This is probably because the underlying file watching is slow or is not catching the newly created files on Windows. Unfortunately you'll probably have to restart the dev server in this case.

@peXed
Copy link
Author

peXed commented Apr 19, 2018

Thanks for the fast reply.

Even restarting the dev server is not fixing the issue (I also tried to run the process as administrator).

Update:
I tested the setup now on Ubuntu (however in the Windows Bash) and on macOS 10.13.3 as well.
Still the same error. Do I miss something in the basic setup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants