1.使用eslint代码检查时,常见的的错误:
1.1 Expected indentation of 0 spaces but found 1
前面的空格个数不对.应该不能有空格.
1.2 Strings must use singlequote
必须使用单引号
1.3The template root requires exactly one element
<template>标签下必须有个根标签
2.
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:.....
使用了关键字或者保留字.修改即可.
3.使用VScode的打开浏览器插件,无法打开浏览器:
新安装了个open in browser,使用时无法使用,无法打开,在VSCode的设置里面搜索 open-in-browser.default,在出现的界面中填写浏览器即可。如
4.vue ui无反应。
https://blog.csdn.net/qq_21859119/article/details/105309423
5.vue中引入echarts 报错“export ‘default‘ (imported as ‘echarts‘) was not found in ‘echarts‘
https://www.cnblogs.com/cyhsmile/p/14098269.html
6. This may cause things to work incorrectly. Make sure to use the same version
需要 删除node_models 文件夹和 package-lock.json 文件重新 npm install. 写RN只需要删除node_models 文件夹.........
7.React数组变化之后,视图没有更新
https://www.cnblogs.com/xzsty/p/13044931.html
8.npm rebuild node-sass出错
在启动hexo博客时,清了下hexo clean,出现“ERROR Plugin load failed: hexo-renderer-scss”,按照它的信息
npm rebuild node-sas 但是还是失败,报一样的错误,按照网上的说法: 先卸载该包再安装也不行. 换淘宝源也不行.
最后直接 删除package-lock.json,yarn.lock,node_modules
再次npm install好了.
9.升级了下npm和node,博客在发布时失败,按照网上的卸载hexo,又安装hexo,发现npm install hexo-cli -g 失败,需要:
npm install -g cnpm --registry=https://registry.npm.taobao.org cnpm install hexo-cli -g
https://www.cnblogs.com/qq597585136/p/6964599.html
10. 清除npm的淘宝镜像。
https://segmentfault.com/q/1010000004596263?utm_source=sf-similar-question
我删除后安装有时成功,有时失败。。。。。。
如果在npm install时,还是有问题,就直接修改为:
终端运行 npm config edit 修改下下面的配置
ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/ registry=https://registry.npm.taobao.org/