-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 'globalLayout' of null #1304
Comments
Exact same issue both with existing and fresh 1.x projects. Tried putting the example GlobalLayout.vue file in /layouts, /components but same error each time. |
Verified that this issue happens all the way back till alpha.32. |
There are two errors:
A quick fix for me: // ...
getThemeConfigValue (key) {
return this.themeEntryFile[key] ||
(this.parentThemeEntryFile && this.parentThemeEntryFile[key]) // <-- replace by this
}
getThemeAgreementFile (filepath) {
const current = path.resolve(this.themePath, filepath)
if (fs.existsSync(current)) {
return current
}
if (!this.parentThemePath) return // <-- add this
const parent = path.resolve(this.parentThemePath, filepath)
if (fs.existsSync(parent)) {
return parent
}
}
// ... |
Thanks for the report, it would be better to create a repro repo (e.g. vuepress-global-layout-repro) at your next time to report issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Cannot read property 'globalLayout' of null
Version
vuepress 1.0.0-alpha.38
Steps to reproduce
What is expected?
Development server start
What is actually happening?
Other relevant information
The text was updated successfully, but these errors were encountered: