vue报错:vue.js:634 [Vue warn]: Cannot find element: #app
编译代码很简单
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Title</title><script src="vue.js"></script><!--<script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>--><!--<script src="http://static.runoob.com/assets/vue/1.0.11/vue.min.js"></script>--><script>new Vue({el:'#app',data: {message:'Hello World!'}});</script>
</head>
<body>
<div id="app"><h2>{{message}}</h2>
</div>
</body>
</html>
一直以为是引入的vue.js有问题换了好多,然后又配置npm
原来是手写的vue.js要在最后引入
因为要先有id为vue-app的div,vue才能获取相应的元素。
更改后:
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Title</title><script src="vue.js"></script><!--<script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>--><!--<script src="http://static.runoob.com/assets/vue/1.0.11/vue.min.js"></script>-->
</head>
<body>
<div id=“app”>
<h2>{{message}}</h2>
</div>
<script>
new Vue({
el:’#app’,
data: {
message:‘Hello World!’
}
});
</script>
</body>
</html>
vue.js在官网下载即可:https://cn.vuejs.org/v2/guide/installation.html
vue报错:vue.js:634 [Vue warn]: Cannot find element: #app相关推荐
- Vue报错:conflicts with v-model on the same element because the latter already expands to a value
Vue报错:conflicts with v-model on the same element because the latter already expands to a value :valu ...
- vue.js报错 vue.js:597 [Vue warn]: Cannot find element: #app
刚开始使用vue的时候发现vue报vue.js:597 [Vue warn]: Cannot find element: #app的错误,初始以为是写的代码有错误导致,于是认真的对照了几遍发现代码和官 ...
- Vue报错:sockjs.js?9be2:1627 GET http://192.168.43.88:8080/sockjs-node/info?t=1631603986586 net::ERR_CO
Vue报错:sockjs.js?9be2:1627 GET http://192.168.43.88:8080/sockjs-node/info?t=1631603986586 net::ERR_CO ...
- 解决Vue报错:[Vue warn]: Error in nextTick: “NotFoundError: Failed to execute ‘insertBefore‘ on ‘Node‘: T
解决Vue报错:[Vue warn]: Error in nextTick: "NotFoundError: Failed to execute 'insertBefore' on 'Nod ...
- vue.js:634 [Vue warn]: Failed to resolve directive: moble
vue报错 原因是在v-model中的单词拼写错误,有时候不小心点到替换啥的,看起来差不多,仔细看才会发现,记录一下
- Vue报错记录——无法找到app
报错信息: [Vue warn]: Cannot find element: #app 原因是:我把相关的js文件放在head里面,导致文件未加载完成就运行js文件,所以js找不到 #app . 改正 ...
- Vue报错:Error in v-on handler: “TypeError: Cannot read properties of undefined (reading ‘skuId‘)“
背景: 当点击按钮时候,正常情况控制台的Network应该要发送一个变化量,现在控制台的Network不仅不显示,而且还报错,报错信息如下: vue.runtime.esm.js?c320:619 [ ...
- Vue报错:3 errors and 0 warnings potentially fixable with the `--fix` option.
Vue报错:3 errors and 0 warnings potentially fixable with the --fix option. 报错如下 解决办法 注释掉.eslintrc.js文件 ...
- Vue报错Module build failed Error Node Sass version 6.0.1 is incompatible with ^4.0.0.解决方案
Vue报错Module build failed: Error: Node Sass version 6.0.1 is incompatible with ^4.0.0.解决方案 错误提示: ERRO ...
- VUE报错:Avoid mutating a prop directly since the value will be overwwritten whenever the parent及解决方案
VUE报错: [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the p ...
最新文章
- hdu 5108(分解质因数)
- java单终端登陆_配置终端服务单一登录
- magento:getChildHtml() 与getChildChildHtml() 的用法,区别
- 弄了一个数学论坛,感觉不错,欢迎加入讨论
- 蓝桥杯 ALGO-77 算法训练 斜率计算
- 火爆的文字游戏你玩了吗?「GitHub 热点速览 v.22.06」
- 物联网从业者必须知道的知识:IMSI号介绍与解析
- 河南理工计算机课程表,河南理工大学张威的课程表.doc
- 关于eWebEditor-在线HTML编辑器控…
- python 键盘输入立刻反应_win10系统,为什么键盘输入字符后得停顿一下,鼠标点击才有效 例如在wor...
- Jumserver安装日志审计和资产管理
- python分词考研英语真题词频(附结果)——读取word、nltk、有道智云API
- php发送邮件email
- AndroidStudio安装JB系官方中文插件
- python 打印日历
- install developing enviroment
- Windows10启动Docker报错:Hardware assisted virtualization and data execution protection must enabled BIOS
- 腾讯云TDSQL数据库信创演进与实践
- 旅游类产品——“马蜂窝自由行”交互原型模板免费使用
- 【信奥赛一本通】1184:明明的随机数(详细代码)