I'm encountering an issue with Vee Validate form validation in Vue.js. As a beginner, I am struggling to grasp the import syntax. After installing vee-validate using npm i vee-validate --save
and placing it in my node_modules directory, I proceeded to import it into my main.js module following the code provided on the official page:
import { extend } from 'vee-validate';
import { required } from 'vee-validate/dist/rules';
extend('required', {
...required,
message: 'This field is required'
});
Unfortunately, upon opening the index.html file, I encountered the following error:
Uncaught SyntaxError: The requested module '/@modules/vue.js' does not provide an export named 'default'
If you would like more information about the vee-validate package, here is the link: https://www.npmjs.com/package/vee-validate?activeTab=readme
Your assistance is greatly appreciated. I apologize if my question seems unclear.