After I completed the todolist app that can be clicked on the submit button with handleSubmit function, and I want to add another function which can trigger handleSubmit function by clicking Enter button on the keyboard.
And then the error massage appear... some information for you to know more about my environment, if you need more info, please tell me.THANK YOU VERY MUCH!!!
init by Vue-cli
package.json
{
"name": "vue-todolist",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.5",
"vue": "^2.6.11"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
# Error Message #
WAIT Compiling... 9:10:17 ├F10: PM┤
98% after emitting CopyPlugin
ERROR Failed to compile with 1 error 9:10:18 ├F10: PM┤
error in ./src/components/Todolist.vue?vue&type=script&lang=js&
Syntax Error: Unexpected token, expected "," (46:6)
44 | }
45 | }
> 46 | },
| ^
47 | },
48 | };
49 |
@ ./src/components/Todolist.vue?vue&type=script&lang=js& 1:0-277 1:293-296 1:298-572 1:298-572
@ ./src/components/Todolist.vue
@ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&
@ ./src/App.vue?vue&type=script&lang=js&
@ ./src/App.vue
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://172.20.10.3:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
Read more here: https://stackoverflow.com/questions/65703139/98-after-emitting-copyplugin-when-npm-run-server-in-vue-js
Content Attribution
This content was originally published by Ray Wang at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.