The index.html page reported an error after npm run bulid was packaged.

static page error occurs after npm run bulid output

main.js Code

import Vue from "vue"
import App from "./App"
import VueRouter from "vue-router"
import routes from "./router"
Vue.use(VueRouter)
// Vue.config.productionTip = false
const router = new VueRouter({
  mode: "history",//-sharp
  routes
})
/* eslint-disable no-new */
new Vue({
  el: "-sharpapp",
  router,
  components: { App },
  template: "<App/>"
})

router.js Code

import Index from "@/views/index"
import Settled from "@/views/settled"
// const Index = () => import(/* webpackChunkName: "group-Index" */ "@/views/index");
// const Settled = () => import(/* webpackChunkName: "group-Settled" */ "@/views/settled");
let routes = [
  {
    path: "/",
    name: "",
    component: Index
  },
  {
    path: "/settled",
    name: "",
    component: Settled
  },
  {
    path: "*",
    hidden: true,
    redirect: { path: "/404" }
  }
]
export default routes;
Mar.03,2021

whether there is a deadlock caused by mutual calls between components


just pick the custom route field in router.js

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-1e444f4-44a92.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-1e444f4-44a92.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?