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

When Standalone build encounters a missing template/renderFn, misleading warning "you use runtime-only build..." is logged #4171

Closed
MikeRalphson opened this issue Nov 10, 2016 · 7 comments

Comments

@MikeRalphson
Copy link

MikeRalphson commented Nov 10, 2016

Vue.js version

2.0.5

Reproduction Link

https://jsfiddle.net/df4Lnuw6/40/

Steps to reproduce

A newbie accidentally creates an empty template, or the template fails to compile, while using the compiler-included build.

What is Expected?

The Vue warning Failed to mount component: template or render function not defined. or similar.

What is actually happening?

The Vue warning You are using the runtime-only build of Vue where the template option is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

This warning message is misleading in the compiler-included build. If it was defined differently in the two builds, this would solve the issue.

@LinusBorg
Copy link
Member

@MikeRalphson, Thanks for filing this issue.

This warning should not appear when using the compiler-inlcuded build, so we will need a reproduction repo for that, please.

@MikeRalphson
Copy link
Author

@LinusBorg Thank you for the prompt response. Issue updated with the repro fiddle. See console output when run.

@posva
Copy link
Member

posva commented Nov 10, 2016

@MikeRalphson There're no logs there

@MikeRalphson
Copy link
Author

MikeRalphson commented Nov 10, 2016

@LinusBorg @posva my apologies, I didn't realise that the fiddle did not auto-save. I've updated it now.

@LinusBorg
Copy link
Member

@MikeRalphson sorry, but you haven't updated the link. https://jsfiddle.net/df4Lnuw6/ still points to the basic "starter" code.

@MikeRalphson
Copy link
Author

@LinusBorg sincere apologies, jsfiddle didn't give me an updated link until I created an account...

Please try https://jsfiddle.net/df4Lnuw6/40/

@LinusBorg
Copy link
Member

LinusBorg commented Nov 11, 2016

Thanks! That seems indeed to be a bug.

Edit: Will label it as an improvement as it's not a bug in the sense that Vue's functionality is broken by this. A better/correct warning would improve developer experience though. Also edited the issues title to reflect the intended improvement.

@LinusBorg LinusBorg changed the title Misleading warning about using compiler-included build in compiler-included build When Standalone build encounters a missing template, should not warn "you use runtime-only build..." Nov 11, 2016
@LinusBorg LinusBorg changed the title When Standalone build encounters a missing template, should not warn "you use runtime-only build..." When Standalone build encounters a missing template/renderFn, misleading warning "you use runtime-only build..." is logged Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants