使用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. 七天学会ASP.NET MVC

    地址一: http://www.cnblogs.com/powertoolsteam/p/MVC_one.html http://www.cnblogs.com/powertoolsteam/p/MV ...

  2. c++自定义数组越异常 ArrayIndexOutOfBoundsException (学习)

    #include <iostream> using namespace std; const int DefaultSize = 10; class Array{public: Array ...

  3. es6 map()和filter()详解【转】

    原文地址:http://www.zhangxinxu.com/wordpress/2013/04/es5%e6%96%b0%e5%a2%9e%e6%95%b0%e7%bb%84%e6%96%b9%e6 ...

  4. 记录一下自己安装Appium的流程

    跟着其他大佬的安装攻略,一步一步来的.过程中遇到了一些问题,也都解决了~ 需要准备的东西: 1.JDK1.8 2.Andriod SDK 3.Node.js 4.Python 5.Appium-pyt ...

  5. 【计算机视觉】深度相机(九)--OpenNI API及中间件说明

    本文由官方文档翻译而来 总览 目的 OpenNI 2.0 API(应用程序编程接口)提供了访问PrimerSense的兼容深度传感器.这就使得一个应用程序能够初始化传感器和从设备接收深度(depth) ...

  6. 1. PHP基本语法规则

    1.1 PHP标记: PHP语言,是一种可以嵌入到“html”代码中的后台处理语言(程序) 有以下几种标记形式,只推荐第一种.  1,<?php   php代码写在这里.....  ?> ...

  7. JS节流和防抖的区分和实现详解

    参考链接:http://caibaojian.com/throttle-debounce.html

  8. Python if __name__ == '__main__': 理解

    if __name__ == '__main__':是为了区分.py文件是自己直接被执行还是被其他文件调用. 当.py文件直接被执行时,默认的是 __name__ = '__main__',因此条件成 ...

  9. 深入理解JS的事件绑定、事件流模型

     一.JS事件 (一)JS事件分类 1.鼠标事件: click/dbclick/mouseover/mouseout 2.HTML事件: onload/onunload/onsubmit/onresi ...

  10. INI配置文件格式解析

    INI配置文件有三要素parameters,sections和comments. 1.parameters 指一条配置,就像key = value这样的. 2.sections sections是pa ...