Vue Error / warning

若您有遇到其它相关问题,非常欢迎在评论中留言,我和其他读者小伙伴们将帮助解决并持续更新至此文,达到帮助更多人的目的。若感本文对您有所帮助请点个赞吧!


Module build failed: Error: Cannot find module 'node-sass

cnpm install node-sass --save


[vue/valid-v-for] Custom elements in iteration require ‘v-bind:key’ directives.

File - Preferences - Settings - 输入(vetur.validation.template),取消勾选,然后重启VSCode

在这里插入图片描述


Error: Cannot find module ‘node-sass’
npm install -g cnpm --registry=https://registry.npm.taobao.org(若已安装则省略此步骤)
 cnpm install node-sass@latest

重建 node_modules
npm install

Error: listen EADDRINUSE: address already in use :::8080
netstat -o -n -a | findstr :8080
taskkill /F /PID xxxx

Module build failed: Error: Cannot find module ‘node-sass’
cnpm install node-sass --save

warning:(Emitted value instead of an instance of Error) the “scope” attribute for scoped slots have been deprecated and replaced by “slot-scope” since 2.5. The new “slot-scope” attribute can also be used on plain elements in addition to to denote scoped slots.

提示下方会给出有此问题的 .vue 文件列表

<template scope 替换为 <template slot-scope


‘vue-cli-service’ 不是内部或外部命令,也不是可运行的程序或批处理文件。
npm install
cnpm install

[Vue warn]: Invalid prop: type check failed for prop “width”. xxxx
      <el-switch
        :width="132"  // 在 width 前加上 ":"

使用 vue v-if vscode 提示红线

修改 Vetur 插件的配置项 "vetur.validation.template": false, 即可。修改路径:Settings / Text Editor / Files / Edit in settings.json

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

"vetur.validation.template": false,

Failed to load resource: net::ERR_FILE_NOT_FOUND

通过 npm run build 命令打包后出现的问题,这是因为将引用设置成绝对路径导致的,解决方法是:

第1步:config/index.js 文件内 assetsPublicPath: '/' 改为 assetsPublicPath: './'(加了.
第2步:修改 './' 后的地址与你的文件构造相对应`

build: {
    assetsPublicPath: './xxx/xxx/'
}

若您有遇到其它相关问题,非常欢迎在评论中留言,我和其他读者小伙伴们将帮助解决并持续更新至此文,达到帮助更多人的目的。若感本文对您有所帮助请点个赞吧!

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

MobMsg

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值