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

报错信息如下图:

报错原因是:vue有两种形式的代码:一种是compiler(模版),另一种是runtime(运行时)模式。

修改方法:修改main.js ,对照自己的代码模式对号入座

原文地址:https://www.cnblogs.com/wpcnblog/p/11356495.html

时间: 2024-07-31 15:40:06

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

Vue 项目在其他电脑 npm run dev 运行报错的解决方法

一个 Vue 项目从一台电脑上传到 github 上之后,再另外一台电脑上 git clone .并使用 npm run dev 或 npm run start 发生以下报错的解决方法. 报错原因 缺少 node_modules 里面的依赖.在项目目录下使用 npm install然后再 npm run dev.如果在这一步当中, npm install 执行的过程中,处于一直卡顿的状态.说明网络状况不佳.建议使用 cnpm 淘宝源. 淘宝源 使用 cnpm -v 查看是否已经安装 cnpm.如

VUE.JS 使用axios数据请求时数据绑定时 报错 TypeError: Cannot set property 'xxxx' of undefined 的解决办法

正常情况下在data里面都有做了定义 在函数里面进行赋值 这时候你运行时会发现,数据可以请求到,但是会报错 TypeError: Cannot set property 'listgroup' of undefined 主要原因是: 在 then的内部不能使用Vue的实例化的this, 因为在内部 this 没有被绑定.可以看下 Stackoverflow 的解释: 解决办法: 1.用ES6箭头函数,箭头方法可以和父方法共享变量 2.在请求axios外面定义一下 var that=this 问题

使用Maven创建Web项目后,jsp引入静态文件提示报错。JSP 报错:javax.servlet.ServletException cannot be resolved to a type

使用Maven创建Web项目后,jsp引入静态文件提示报错. 错误提示:javax.servlet.ServletException cannot be resolved to a type 错误如下图: 解决方案: 在Maven的pom文件中引发如下依赖即可: <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <versio

CentOS7.0开机报错“piix4_smbus”和“dev fd0”的解决办法

系统:CentOS 7.0 X64 报错现象: 此问题包含了两个错误: 错误1: piix4_smbus host smbus controller not enabled 修改办法: [[email protected] ~]# lsmod | grep i2c i2c_piix4              22106  0  i2c_core               40325  2 drm,i2c_piix4 [[email protected] ~]# vi /etc/modprob

SQL Developer 4.0 启动报错“unable to create an instance of the java virtual machine located at path”

安装了Oracle之后,第一件事情就是想想怎么去连接,进而操作.SQL Developer是官方提供的强大工具,个人看来也是第一选择. 目前官网提供的最新版是4.0.1.14.48,下载下来之后,就跃跃欲试了.将下载下来的包解压,直接运行sqldeveloper.exe这个文件,选择了本地安装的JDK路径,之后却不幸的报错了,提示"unable to create an instance of the java virtual machine located at path",具体界面

RedHat5.5_X64 Linux安装oracle 11.2.0.3 报错

REDHAT linux 安装 11G  11.2.0.3   报错 oracle用户执行./runinstaller后 直接报错 查看日志后 [[email protected] OraInstall2012-06-29_12-08-50AM]# more installActions2012-06-29_12-08-50AM.log  SEVERE: [FATAL] HXZG: HXZG. Refer associated stacktrace #oracle.install.commons

关于web.xml3.0启动报错

九月 08, 2017 10:18:19 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:war_item' did not find a matching property. 九月 08, 20

AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.

体验最新版AndroidStudio3.0 Canary 8的时候,发现之前项目的butter knife报错,用到注解的应该都会报错 Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to

mysql8.0+运行报错The server time zone value &#39;&#214;&#208;&#185;&#250;&#177;&#234;&#215;&#188;&#202;&#177;&#188;&#228;&#39; is unrecognized or represents more than one time zone. 解决办法

话不多说,从错误即可知道是时区的错误,因此只要将时区设置为你当前系统时区即可, 因此使用root用户登录mysql,按照如下图所示操作即可. 我电脑的系统为北京时区,因此在系统中设置后,再连接数据库运行,一切OK! mysql8.0+运行报错The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. 解决办法 原文地址:https://www.cnblogs.co

myeclipse 从svn检出项目后会出现 所有的spring注解报错的问题

myeclipse  从svn检出项目后会出现 所有的spring注解报错的问题  即使更换项目jdk 都不好使. 解决方法如下: 1. 刚检出的项目有可能是 jdk 1.5 一下版本编译的.你只需要切换  编译版本就OK了. 2. 步骤如下: (1)点击项目右键-->选择properties (2)从弹出的窗口中选择 java compiler-->然后选择 适合自己的 jdk 版本就可以了.选择完 apply 一下  选择 yes. 原文地址:https://www.cnblogs.com