vuepress icon indicating copy to clipboard operation
vuepress copied to clipboard

Vuepress Build fails if refered file not found

Open jmoratat opened this issue 6 years ago • 8 comments

Feature request

What problem does this feature solve?

When some of the markdown files refers to another file (img or another markdown file) that is not in the folders of the project, in the build phase, build fails and not initialize and not continue rendering the rest of the markdowns files:

(undefined) ./arquitectura/sca-microv1.5.0.md?vue&type=template&id=65a90e13& (./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/@vuepress/core/node_modules/.cache/vuepress","cacheIdentifier":"13c1d6ed-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??ref--1-1!./node_modules/@vuepress/markdown-loader??ref--1-2!./arquitectura/sca-microv1.5.0.md?vue&type=template&id=65a90e13&)
Module not found: Error: Can't resolve './docs/assets/nmap_matrix5.jpg'

What does the proposed API look like?

The same as now, but configurable.

How should this be implemented in your opinion?

There could be a configuration in the config.js elegible by the developer that allows to make resume of the build instead of failing and stop rendering the rest of the files.

jmoratat avatar Aug 27 '19 06:08 jmoratat

Hello @JorgeMorata can you please add a github repo to see the need please

flozero avatar Sep 06 '19 01:09 flozero

@JorgeMorata I don't think an example repo is necessary to demonstrate this. It would just be nice for the build to continue in spite of missing assets.. sort of like how if you have one broken link to an image on your entire website your browser won't refuse to load it. This can be really useful for things like when you're trying to convert an existing folder of markdown files to using vuepress and you get bored of relinking assets (or you don't have enough familiarity to want to decide where you want to keep your assets) and want to work on something else for a couple minutes, or even just look at the site.

Throwing a warning instead of a warning would be awesome.

I have no idea how possible this would be to set up (a webpack error is a webpack error) but it would certainly be nice.

thedamon avatar Dec 08 '19 21:12 thedamon

Hello! This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues requiring feedback after 20 days of inactivity. It’s been at least 10 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. (A maintainer can also add the label not stale to keep this issue open.)

Thanks for being a part of the Vue community! 💪💚️

vue-bot avatar Dec 18 '19 21:12 vue-bot

It's like @thedamon said. I think it's not needed a repo to explain the failure. However, now i fix the problem deleting the broken link, but i think it would be nice to solve it or make it configurable in future releases of vuepress.

Thank you!

jmoratat avatar Dec 18 '19 21:12 jmoratat

Why would you want to continue the build process, if a resource cannot be found?

Adding an option that allows users to continue the process even if there is broken link does not like a good idea. It would be like "encouraging" users to do mistakes, and don't explicitly notify them know about it.

kefranabg avatar Dec 19 '19 15:12 kefranabg

@kefranabg The app, allows to a multibackend (and multi-git repo) ecosystem developers to publish their app documentation. The publish process is centralized in a pipeline that extract all the repositories documentation and publish in a "marketplace" (vuepress app) automatically without app developers intervention.

If an app fails to create its documentation (that is completly alien from anothers apps), all the others app are affected and cannot publish their documentation, and the owner of the marketplace must review their code and solve it.

If there were 5 or 10 apps in this marketplace, there wouldn't any problem, but i'm talking about a 500-1000 apps marketplace, so the vuepress owner cannot spend this time in solve this problems.

I hope my explaination make you have an idea of the problem.

Thank you!

jmoratat avatar Dec 19 '19 18:12 jmoratat

Say you have an error that makes one link on one page out of 100000 not work. It’s nice if that doesn’t stop the whole site from working. Sure it’s nice to fix it, but I’m a large project with lots of work to get done it’s nice to be able to prioritize the work that has the biggest impact.

I think it’s okay and normal to launch software with known bugs (also important to fix them)

I’d still be able to work on and look at the site while I’m moving things around even if one link is currently broken

On Thu, Dec 19, 2019 at 10:50 Franck Abgrall [email protected] wrote:

Why would you want to continue the build process, if a resource cannot be found?

Adding an option that allows users to continue the process even if there is broken link does not like a good idea. It would be like "encouraging" users to do mistakes, and don't explicitly notify them know about it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vuejs/vuepress/issues/1804?email_source=notifications&email_token=AAKPYIZKFKPSZYHHLRUT7DDQZOJ5JA5CNFSM4IP6VUN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHKBDDA#issuecomment-567546252, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKPYI3AGWKEDV4LD4TDRELQZOJ5JANCNFSM4IP6VUNQ .

-- Damon Muma

thedamon avatar Dec 21 '19 19:12 thedamon

Is this feature implemented?

I have this same problem with vitepress.

I don't think it is reasonable to suppose every team in planet will make sure all assets are in place when building their docs.

It must be an option to the site manager to define which behavior is intended for his build process.

Fabiano