Level 37
if (document.getElementById('#app')) { const app = new Vue({ el: '#app' }); }
2 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I am having problems with Vue stopping my Jquery code from working on many pages of my Laravel App.
Is there a way to stop Vue from checking if id=app is loaded please as I keep seeing this error when not added to a page:
app.js:32684 [Vue warn]: Cannot find element: #app
Or shall I still include it but simply as:
<div id="app"></div>
on the pages where I do not want to use it? Unfortunately I do not know vue yet but I still need it on one single page for a laravel component to work correctly.
Thanks.
Please or to participate in this conversation.