Vue——报错总结

前言

总结一些vue中遇到的一些错误

错误

[Vue warn]: Cannot find element: #app

报错原因

1. 把对应js放在了head标签里面,页面没有加载完成就进行渲染,导致找不到#app。
2.加了<template></template>标签

解决方案

1.把标签放到body后面
2.去除<template></template>标签

Module build failed: Error: ENOENT: no such file or directory, scandir 'd:\wamp\www\scrm\scrm_public\node_modules\node-sass\vendor

报错原因
没有对应的sass依赖

解决方法

1. 删除重新安装所有依赖(这个没有解决)
2. cnpm rebuild node-sass(解决)

猜你喜欢

转载自www.cnblogs.com/wangyang0210/p/12150285.html