[Vuejs]-Vue CLI generates empty body with error: Cannot find element: #app after migration vuecli 2>3

2πŸ‘

βœ…

I figured it out! The new index.html isn’t in the root anymore. In VueCli 3 this is in the /public folder!

So I had to move /index.html to /public/index.html.

πŸ‘€Tom Franssen

0πŸ‘

I think you need to create a place in the DOM for the rendering to happen. In this case the application is looking for an element with the id of β€˜app’.

<body>
  <div id="app"></div>
  <script type="text/javascript" src="/app.js"></script>
</body>
πŸ‘€Rob Brander

Leave a comment