zoukankan      html  css  js  c++  java
  • vue@2.5.2 对等的vue-template-compiler【Vue】

    前置说明:在研究别人的开源项目的时候,本地安装好项目依赖。
    运行npm run start ,出现如下

    - vue@2.5.2 (D:IDEA_Workfulingfront
    ode_modules\_vue@2.5.2@vuedistvue.runtime.common.js)
    - vue-template-compiler@2.6.10 (D:IDEA_Workfulingfront
    ode_modules\_vue-template-compiler@2.6.10@vue-template-compilerpackage.json)
    
    This may cause things to work incorrectly. Make sure to use the same version for both.
    If you are using vue-loader@>=10.0, simply update vue-template-compiler.
    If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
    
        at Object.<anonymous> (D:IDEA_Workfulingfront
    ode_modules\_vue-template-compiler@2.6.10@vue-template-compilerindex.js:10:9)
        at Module._compile (module.js:652:30)
        at Object.Module._extensions..js (module.js:663:10)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
        at Module.require (module.js:596:17)
        at require (internal/module.js:11:18)
        at Object.<anonymous> (D:IDEA_Workfulingfront
    ode_modules\_vue-loader@13.7.3@vue-loaderlibparser.js:1:80)
        at Module._compile (module.js:652:30)
        at Object.Module._extensions..js (module.js:663:10)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
        at Module.require (module.js:596:17)
        at require (internal/module.js:11:18)
    
     @ ./src/main.js 2:0-24
     @ multi ./node_modules/_webpack-dev-server@2.11.5@webpack-dev-server/client?http://localhost:8710 webpack/hot/dev-server babel-polyfill ./src/main.js
    
     error  in ./src/components/icon-svg/index.vue
    
    Module build failed: Error:
    
    Vue packages version mismatch:
    
    - vue@2.5.2 (D:IDEA_Workfulingfront
    ode_modules\_vue@2.5.2@vuedistvue.runtime.common.js)
    - vue-template-compiler@2.6.10 (D:IDEA_Workfulingfront
    ode_modules\_vue-template-compiler@2.6.10@vue-template-compilerpackage.json)
    
    This may cause things to work incorrectly. Make sure to use the same version for both.
    If you are using vue-loader@>=10.0, simply update vue-template-compiler.
    If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
    
        at Object.<anonymous> (D:IDEA_Workfulingfront
    ode_modules\_vue-template-compiler@2.6.10@vue-template-compilerindex.js:10:9)
        at Module._compile (module.js:652:30)
        at Object.Module._extensions..js (module.js:663:10)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
        at Module.require (module.js:596:17)
        at require (internal/module.js:11:18)
        at Object.<anonymous> (D:IDEA_Workfulingfront
    ode_modules\_vue-loader@13.7.3@vue-loaderlibparser.js:1:80)
        at Module._compile (module.js:652:30)
        at Object.Module._extensions..js (module.js:663:10)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
        at Module.require (module.js:596:17)
        at require (internal/module.js:11:18)
    

    说明:从错误中,可以看到是由于Vue和vue-template-compiler的版本不匹配导致的

    解决:

    先删除文件夹node_modules文件夹下的vue-template-compiler文件
    
    >cnpm install vue-template-compiler@2.5.2 --save-dev
    
    再次运行 npm run start  即可
    
  • 相关阅读:
    用户登录系统(三)
    SQL server 2005 时间函数应用 查询出结果为00:00:00 小时、分钟、秒
    Windows Server 2003系统 常用操作技巧集绵,发现了继续添加
    新一代井下数字集群通讯系统需求分析(一)
    WPF学习笔记(一)
    建立一个VSS源代码管理服务器,下面介绍建立的过程与实际应用情况
    Vista下使用VS2005的时候提示"没有安装FrontPage服务器扩展"的问题。
    SQL语句导入/导出EXCEL(转载自:白袜子blog)
    sql2005"因为它正用于复制"的错误解决办法
    (转)CS0016: 未能写入输出文件“c:\WINDOWS\xxxxxsktsuj.dll”“拒绝访问。”的处理
  • 原文地址:https://www.cnblogs.com/liuge36/p/12614746.html
Copyright © 2011-2022 走看看