Aprende Vue.js creando tu propio clon de Instagram (P3 | Validación de Formularios)

Поделиться
HTML-код
  • Опубликовано: 9 ноя 2024

Комментарии • 1

  • @cazzadore
    @cazzadore 3 года назад

    Hola,
    Muchas gracias por tan buen tutorial.
    Sin embargo, debo comentarle que al intentar instalar vee-validate (con la instrucción: "npm i vee-validate").
    Recibo el siguiente mensaje:
    =============================================================================================
    npm ERR! code ERESOLVE
    npm ERR! ERESOLVE unable to resolve dependency tree
    npm ERR!
    npm ERR! While resolving: frontend@0.1.0
    npm ERR! Found: vue@2.6.14
    npm ERR! node_modules/vue
    npm ERR! vue@"^2.6.11" from the root project
    npm ERR!
    npm ERR! Could not resolve dependency:
    npm ERR! peer vue@"^3.0.0" from vee-validate@4.4.11
    npm ERR! node_modules/vee-validate
    npm ERR! vee-validate@"^4.4.11" from the root project
    npm ERR!
    npm ERR! Fix the upstream dependency conflict, or retry
    npm ERR! this command with --force, or --legacy-peer-deps
    npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
    =============================================================================================
    Y, al adicionar el los scripts y ejecutar la instrucción "yarn serve" (para encender el servidor).
    Recibo el siguiente mensaje:
    =============================================================================================
    yarn run v1.22.5
    $ vue-cli-service serve
    INFO Starting development server...
    98% after emitting CopyPlugin
    ERROR Failed to compile with 1 error
    This dependency was not found:
    * vue-Validate in ./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/views/Login.vue?vue&type=script&lang=js&
    To install it, you can run: npm install --save vue-Validate
    =============================================================================================
    ¿Alguna sugerencia para solventar estos problemas?
    PD:
    Adjunto la información en el documento "package.json". Ya que, (como dato curioso) aparece instalado como dependencia el paquete "vee-validate":
    =============================================================================================
    {
    "name": "frontend",
    "version": "0.1.0",
    "private": true,
    "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build"
    },
    "dependencies": {
    "core-js": "^3.6.5",
    "line-awesome": "^1.3.0",
    "nib": "^1.1.2",
    "pug": "^3.0.2",
    "pug-plain-loader": "^1.1.0",
    "register-service-worker": "^1.7.1",
    "vee-validate": "^2.2.15",
    "vue": "^2.6.11",
    "vue-router": "^3.2.0",
    "vuex": "^3.4.0"
    },
    "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-pwa": "~4.5.0",
    "@vue/cli-plugin-router": "~4.5.0",
    "@vue/cli-plugin-vuex": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "stylus": "^0.54.7",
    "stylus-loader": "^3.0.2",
    "vue-template-compiler": "^2.6.11"
    },
    "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead"
    ]
    }
    =============================================================================================
    Saludos