Open sullivanpt opened 5 years ago
maybe this issue has on #881 same problem. this issue topic about "problem on additional page regist in build command". can you try applied #909 PR on your environment?
@mAKEkr thanks for the suggestion, but from code inspection I don't see how it can help. The spurious warning comes from vuepress/packages/@vuepress/markdown-loader/index.js which assumes a physical file ending '.md' exists for the relative link. I think it needs to be changed to look at slugs too, but I'm not sure how to do that.
// check if relative links are valid
links && links.forEach(link => {
….
if (!fs.existsSync(file) && (!altfile || !fs.existsSync(altfile))) {
this.emitWarning(
new Error(
`\nFile for relative link "${link}" does not exist.\n` +
`(Resolved file: ${file})\n`
)
)
}
})
@mAKEkr They are two different things
@ulivz @sullivanpt I'm sorry. I thought that the additionalpages were not registered in the build process. 😅 I tested on my environment, doesn't displaying any some of errors. can you provide reproduced repository?
@mAKEkr sure https://github.com/sullivanpt/vuepress-issue-1162
Bug report
Version
vuepress@1.0.0-alpha.30
Steps to reproduce
create a vuepress project with this plugin
and this file /section/README.md with content
note: behavior is same if link is /section/ex-two.html
then run npm docs:dev
What is expected?
No warnings
Aside: the links work correctly. It's just the warning message that is undesired.
What is actually happening?
See this warning in console when building
Other relevant information