Description: I am working on a leaderboard web application using Vue.js. After completing my code, I attempted to launch the server on localhost, but encountered an error. The error message I received is as follows:
Uncaught runtime errors:
ERROR
Cannot read properties of undefined (reading 'use')
TypeError: Cannot read properties of undefined (reading 'use')
at eval (webpack-internal:///./src/router.js:10:45)
at ./src/router.js (http://localhost:8080/js/app.js:79:1)
at __webpack_require__ (http://localhost:8080/js/app.js:203:33)
at fn (http://localhost:8080/js/app.js:436:21)
at eval (webpack-internal:///./src/main.js:4:65)
at ./src/main.js (http://localhost:8080/js/app.js:69:1)
at __webpack_require__ (http://localhost:8080/js/app.js:203:33)
at http://localhost:8080/js/app.js:1324:109
at __webpack_require__.O (http://localhost:8080/js/app.js:249:23)
at http://localhost:8080/js/app.js:1325:53
I tried creating a new project to fix the error, but the problem persists. I also made sure to repeatedly install both Vue and Vue Router, but that didn't resolve the issue. I am seeking assistance in identifying and resolving the problem.
import Vue from "vue";
import VueRouter from "vue-router";
import Scoreboard from "./components/ScoreboardTable.vue";
import Submissions from "./components/SubmissionDetails.vue";
Vue.use(VueRouter);
const routes = [
{ path: "/scoreboard", component: Scoreboard },
{ path: "/submissions/:problemId", component: Submissions },
];
const router = new VueRouter({
routes,
});
export default router;
The objective of this project is to develop a single-page app for viewing a competition's scoreboard. The app should have two pages: the Scoreboard page and the Submissions page, each serving a specific purpose.
I appreciate any assistance in locating and fixing the issue. Thank you in advance!