There are two problems with vue

Cannot find element:-sharpapp and Failed to mount component: template or render function not defined. Two errors

where app.vue
< template >

<div id="app">
    <router-view/>
</div>

< / template >

< script >

export default {
    name: "App"
}

< / script >

< style lang= "less" >

@import "~vux/src/styles/reset.less";

< / style >

main.js
import Vue from "vue"
import App from". / App"
import FastClick from "fastclick"

import router from". / router"
import VueCookies from "vue-cookies"
Vue.use (VueCookies);

FastClick.attach (document.body)

Vue.config.productionTip = false

/ eslint-disable no-new /
new Vue ({

el: "-sharpapp",
router,
components: { App },
template: "<App/>"

})

Why is it wrong?

Mar.21,2021

the first error points to the dom structure in index.html where id is app, and that's what el:'- sharpapp', is looking for.

the second error, render function this is the problem with your vue. Pay attention to the version of your vue-cli. The earlier version of vue-cli cannot automatically introduce the correct vue.js,. You need to manually configure the path of vue in webpack by yourself, similar to:

// entry
resolve: {
    extensions: ['.js', '.vue', '.json'],
    alias: {
      'vue$': 'vue/dist/vue.esm.js',
      '@': resolve('src'),
    }
  },

try import App from'. / App' change it to import App from'. / App.vue'
if not, provide a screenshot of your directory structure

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37336-2c058.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37336-2c058.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?