今天把远程仓库拉下项目,运行'npm run dev'时,报错


Module build failed: Error: Cannot find module 'vue-template-compiler'

报错原因:通常出现于一些依赖库的更新或者安装新的依赖库之后(可以认为npm update已经成为一种习惯),导致了vue和vue-template-compiler的版本不一致。

解决方案:统一vue和vue-template-compiler的版本


"vue": "2.3.3",
"vue-template-compiler": "2.4.4",

查了并试了一下只要运行两个代码就行了


npm instll
npm update

先运行npm install 之后会换一种报错:

Vue packages version mismatch
这种是重新安装了依赖,但是还没有更新

在接着运行npm update就可以使用

先运行npm update 报错还是一样,我们只要重新在执行一下npm install 安装一下就可以成功运行

原文地址:https://segmentfault.com/a/1190000012672988

Vue和vue-template-compiler版本之间的问题的更多相关文章

  1. You are using the runtime-only build of Vue where the template compiler is not available. Either pre

    在升级脚手架到vue-cli3.0版本的时候出现了这个报错: [Vue warn]: You are using the runtime-only build of Vue where the tem ...

  2. You are using the runtime-only build of Vue where the template compiler is not available.

    使用vue-cli搭建的项目,启动报错 You are using the runtime-only build of Vue where the template compiler is not a ...

  3. You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

    异常 You are using the runtime-only build of Vue where the template compiler is not available. Either ...

  4. [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

    转载自:https://segmentfault.com/a/1190000006435886 解决办法:添加package.config.js配置文件中,添加本文章的红色部分代码 import vu ...

  5. [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available

    原文链接https://blog.csdn.net/xiaomajia029/article/details/88320233 问题描述: 原因分析:在项目配置的时候,默认 npm 包导出的是运行时构 ...

  6. Vue Cli 报错:You are using the runtime-only build of Vue where the template compiler is not availabl

    报错原因: 这里引用的是vue.runtime.esm.js,造成的不能正常运行. vue-cli 2.x 解决方法: 在webpack.base.conf.js配置文件中多加了一段代码,将 vue/ ...

  7. Vue项目用了脚手架vue-cli3.0,会报错You are using the runtime-only build of Vue where the template compiler is not available.....

    摘自: https://blog.csdn.net/wxl1555/article/details/83187647 报错信息如下图: 报错原因是:vue有两种形式的代码:一种是compiler(模版 ...

  8. 聊聊Vue.js的template编译

    写在前面 因为对Vue.js很感兴趣,而且平时工作的技术栈也是Vue.js,这几个月花了些时间研究学习了一下Vue.js源码,并做了总结与输出. 文章的原地址:https://github.com/a ...

  9. Kendo-Grid for Vue API and Template

    写此博客的原因:在做项目时前端用的vue,后端用的jfinal.在前端veu中调用了kendo grid插件,但是在官方文档中对kendo grid for vue 的api和template都不太详 ...

  10. es6下 vue实例属性template不能使用

    esm模式下 不能使用template,需要引入非esm的vue.js,查看vue源码的包的dist目录下 文件标有esm是支持ems,没有标记,就是不支持(这个知识,怎么说了,应该属于webpack ...

随机推荐

  1. SVN 部分常用命令

    1. svn status 提交前显示出本地文本和版本库文本的区别 [url=] L abc.c # svn已经在.svn目录锁定了abc.c M bar.c # bar.c的内容已经在本地修改过了 ...

  2. .map(function(item)...)这个是按hashcode自动遍历的,怎么才能按照我想要的顺序遍历呢?

    上图是我前端的遍历代码.我的item上有一个name的字段,分别是营业执照,税务登记证和经营许可证,我怎么设置才能让函数每次遍历的时候按照这个顺序遍历,而不是item自带的顺序呢? .map(func ...

  3. swift语言点评十五-$0

    import UIKitimport XCPlayground class ViewController: UIViewController { func action() { print(" ...

  4. CDR X6三折促销活动,可入

    继CDR X6双十二限量活动之后,CorelDRAW官方为庆祝2018新年新气象,折扣狂潮,又来一波.上次活动由于时间短,任务急,数量少,使得不少小伙伴抱憾而止,选择默默等待良机.现在,良机来了,即便 ...

  5. 用AI识别内部人威胁面临的道德规范

    用AI识别内部人威胁面临的道德规范 还记得汤姆·克鲁斯的<少数派报告>吗?人工智能可识别昭示未来风险的员工行为.该如何有效且有道德地使用这一数据呢? 为保护公司网络不受恶意软件.数据渗漏和 ...

  6. 路飞学城Python-Day7(practise)

    # 1.编码问题# i.请说明python2与python3中的默认编码是什么?# python2中的默认编码是ASCII码,只能识别英文等其他字符# python3中的默认编码是utf-8# ii. ...

  7. Fiddler常用配置

    过滤目标地址: 抓取https的设置:

  8. [NOIP2012提高组]疫情控制

    题目:洛谷P1084.codevs1218.Vijos P1783. 题目大意:有一棵n个节点的,根为1的带权树和m支军队.每支军队可以在一个点上停下,那么从1开始就不能经过这个点了.现在有m支军队已 ...

  9. BZOJ 3129 [SDOI2013]方程 (拓展Lucas)

    题目大意:给定一个方程$X_{1}+X_{2}+X_{3}+X_{4}+...+X_{n}=M$,$\forall X_{i}<=A_{i} (i<=n1)$ $\forall X_{i} ...

  10. redis做成windows服务

    打开cmd切换到redis根目录 执行安装命令  redis-server.exe --service-install redis.windows.conf --loglevel verbose 卸载 ...