百变鹏仔-专注前端行业精选
当前位置:网站首页 > 最近更新 > 前端开发 > JavaScript > 正文

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

作者:鹏仔先生日期:2024-02-22 16:09:10浏览:389分类:JavaScript

本次使用VUE开发H5项目中安装了vue-html5-editor富文本编辑器,结果报错以下问题


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


[Vue warn]: Error in mounted hook: "TypeError: Cannot set properties of undefined (setting 'innerHTML')"


解决方法,在vue.config.js文件中配置如下所示

module.exports = {
  runtimeCompiler: true
}


配置完后,先终止项目,重新 npm run serve 启动即可。

手机扫码访问

暂无评论,来添加一个吧。

取消回复欢迎 发表评论:

关灯