使用vue-cli搭建的项目,启动报错

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

解决方法

在vue.config.js文件中配置

const path = require("path");

module.exports = {
// webpack配置 - 简单配置方式
configureWebpack: {
resolve: {
alias: {
// 别名
vue$: "vue/dist/vue.esm.js", //加上这一句
"@api": path.resolve(__dirname, "./src/api"),
"@utils": path.resolve(__dirname, "./src/utils")
}
}
},
chainWebpack: config => {
// GraphQL Loader
config.module
.rule('html')
.test(/\.html$/)
.use('html-loader')
.loader('html-loader')
.tap(options => {
return options;
});
}
}

再次启动就OK了

You are using the runtime-only build of Vue where the template compiler is not available.的更多相关文章

  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. 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 ...

  3. [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 ...

  4. [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 包导出的是运行时构 ...

  5. 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(模版 ...

  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.runtime.esm.js:593 [Vue warn]: Invalid prop: custom validator check failed for prop "value".报错解决

    在uni中使用 picker组件,一直报错 vue.runtime.esm.js:593 [Vue warn]: Invalid prop: custom validator check failed ...

  8. eclipse中build path 中JDK与java compiler compliance level的问题(转)

    roject facets做什么用? http://baike.baidu.com/view/6257360.htm,其实我感觉,就是让我们在创建项目时候,可以独立定义一个有一个模板供我们使用,在里面 ...

  9. WebStorm 使用webpack打包(build) Vue 静态资源无法访问(路径不对)问题

    在WebStorm中使用webpack打包 (命令npm run build) 后生成在项目的dist目录下,在浏览器打开,静态资源js.css等无法加载.因为打包时,资源使用了绝对路径. 解决: 打 ...

随机推荐

  1. 绿色版plsql安装和安装包

    转: 绿色版plsql安装和安装包 2018年08月07日 19:53:15 YoungLee16 阅读数 4890   最近在使用数据库的时候,或多或少的会出现一些问题,下面总结下如何安装ORACL ...

  2. Ideal常用 快捷键

    IntelliJ Idea 常用快捷键列表   Alt+回车 导入包,自动修正Ctrl+N   查找类Ctrl+Shift+N 查找文件Ctrl+Alt+L  格式化代码 Ctrl+Alt+O 优化导 ...

  3. 公司手机打卡app时间和百度时间差30秒解决

    问题: 某天发现公司手机打卡app时间和百度时间差30秒解决 分析: nginx        192.168.0.23 外网 : 220.236.7.43 mysql主    192.168.0.2 ...

  4. 分组卷积+squeezenet+mobilenet+shufflenet的参数及运算量计算

    来一发普通的二维卷积 1.输入feature map的格式为:m * m * h1 2.卷积核为 k * k 3.输出feature map的格式为: n * n * h2 参数量:k * k * h ...

  5. node-sass 安装失败解决方案

    从失败到成功,尝试了不下20,最终终于解决了: 解决方案如下: 参考方案一:http://www.jianshu.com/p/89f5e094b8ce(具体的配置看这个) 参考方案二:http://b ...

  6. Flutter 异步Future与FutureBuilder实用技巧

    什么是Future? Future表示在接下来的某个时间的值或错误,借助Future我们可以在Flutter实现异步操作.它类似于ES6中的Promise,提供then和catchError的链式调用 ...

  7. RMQ问题--ST

    #include<iostream> #include<cstdio> #include<cmath> using namespace std; ; ]; int ...

  8. 安装flask_mysqldb出现报错问题解析

    安装 mysqldb (pip3 install Flask-MySQLdb)报错 EnvironmentError: mysql_config not found ERROR: Command er ...

  9. VC 学习笔记 (持续更新)

    基于windows的程序和基于MS-DOS的程序之间的一个最根本的差别,就在于MS-DOS程序是通过操作系统的功能来获得用户的输入的,而windows程序则是通过操作系统 发送的消息来处理用户输入的. ...

  10. IOS div上下滑动效果

    内容放在div中 div加样式:width: 100%;height: 100%;z-index: 70;overflow: auto;