Reputation: 21
I am currently using Webpack as a build system and have set up everything properly so that it was working well.
All of the sudden, it started giving me an error stating:
[Vue warn]: Cannot find element: #app
I tried running the beforeCreated()
hook on the root instance itself, where if the element does not exist I manually create it. But to no avail.
I have uploaded my code to Gitub, with a package.json
file. It would be really amazing if someone can take a look and provide a solution.
I went spend hours going trough the code and even removed all other dependencies, but the most basic configurations, changed the import order and it still doesn't work.
Here is the link to the Github repo: Github
Upvotes: 0
Views: 3759
Reputation: 192
I think you are missing a #app
element in the index.html to mount the app:
<body>
<div id="app"></div>
<script src="/dist/build.js"></script>
</body>
Upvotes: 2