JackieDYH
阅技术、码经验、勤总结、乐分享、喜交流。
展开
-
安装依赖报-gyp: No Xcode or CLT version detected!
成功安装后,现在可以下载新的 npm 包,而不会出现任何 (gyp) 错误消息。要修复此错误,您需要重新安装 Xcode 命令行。下载和安装 Xcode 命令行工具需要一些时间。此命令会弹出一个提示,单击按钮并继续安装。上面的命令要求输入系统密码。原创 2024-05-27 12:22:49 · 335 阅读 · 0 评论 -
在TypeScript项目中导入JavaScript文件包提示无法找到模块“@/api/xxx”的声明文件-解决声明文件报错问题
ts项目中导入自定义js文件提示 无法找到模块“@/api/xxx”的声明文件当 import 一个没有类型声明的第三方库时,TypeScript 不知道 import 进来的东西是什么类型,只能,这也就是我们常说的。所有正常的前端项目都会禁止 implicit any 出现,所以就报错了。这些方法,因为这样一来我们就远离了 TypeScript 给我们的保护。原创 2024-04-01 10:31:32 · 2249 阅读 · 0 评论 -
Vue项目创建新文件后都会提示仅当 “module” 选项设置为 “es2022”、“esnext”、“system”、“node16” -警告提示
vscode中vue项目创建新文件后都会提示仅当 “module” 选项设置为 “es2022”、“esnext”、“system”、“node16” 或 “nodenext”,且 “target” 选项设置为 “es2017” 或更高版本时,才允许使用顶级 “await” 表达式。是一个较新的 JavaScript 功能,它只在 ES2022 和更高版本的 ECMAScript 模块中可用,以及在 Node.js 版本 16 或更高版本的模块系统中。确保在 VS Code 中打开的项目根目录有。原创 2024-03-13 16:10:09 · 1650 阅读 · 0 评论 -
VSCode提示-所有解构出的成员都未使用。ts-plugin
volar插件关闭volar插件后,就出现了“所有解构出的成员都未使用。ts-plugin(6198)已声明“__VLS_template”,但从未读取其值。ts-plugin(6133) ”这个报错。原创 2024-03-13 16:09:43 · 1606 阅读 · 0 评论 -
Vue eslint 报错 error Component name “xxxx“ should always be multi-word-创建文件后的命名问题导致报错
组件命名的时候没按照 ESLint 的官方代码规范进行命名,根据 ESLint 官方代码风格指南,除了根组件App.vue以外,其他自定义组件命名要。ignores: ['Home', 'User'] //在这个数组中加入需要忽略的组件名。如:myHome.vue、userPwd.vue等等。经过上面的配置后,只需要重启项目即可。// 添加组件命名忽略规则。// 关闭组件命名规则。原创 2024-01-15 07:15:00 · 795 阅读 · 0 评论 -
Vue使用element-plus的table组件报错ResizeObserver loop completed with undelivered notifications.
ERROR报错ResizeObserver loop completed with undelivered notifications.原创 2024-06-11 11:54:48 · 1636 阅读 · 0 评论 -
Vue/cli不同环境下打包后js文件没有添加hash值-会导致缓存问题-解决
值,所以在配置不同环境对应命令的时候,把NODE_ENV='production'加上。包文件判断是根据NODE_ENV='production',这时会对应打包加上。process.env.VUE_APP_ENV 会读取不到值。全局的环境变量需要以VUE_APP_ 开头。原创 2024-09-09 09:00:29 · 382 阅读 · 0 评论 -
Vue中启动提示polyfill缺少-webpack v5版本导致
因为我们的项目使用webpack v5,其中polyfill Node核心模块被删除。所以,我们安装它是为了在项目中访问这些模块。原创 2023-09-05 14:06:57 · 1036 阅读 · 0 评论 -
Vue3使用$refs获取节点生产环境undefined-使用getCurrentInstance-ctx应改用proxy
Vue3使用$refs获取节点生产环境undefined-使用getCurrentInstance-ctx应改用proxy原创 2023-07-03 09:58:01 · 1251 阅读 · 0 评论 -
Vue中Vuex调用其他store中方法为什么要加{ root: true }-dispatch(‘app/showLoading‘, {}, { root: true })
在使用Vuex时,如果需要在一个模块中调用另一个模块的action或mutation时,需要加上{ root: true }来告诉Vuex从根模块中进行查找。store中直接使用其他store的方法 dispatch('app/showLoading');需要注意的是,只有在跨越模块的调用时才需要使用。,在同一个模块中调用其他方法不需要加上。,则Vuex会从当前模块中查找。模块,而不是从根模块开始查找。的模块中调用另一个名为。表示从根模块开始查找。原创 2024-11-05 09:18:48 · 145 阅读 · 0 评论 -
Vue3使用Pinia-store选项式api和组合式api两种使用方式-快速入门demo
Vue3使用Pinia-store选项式api和组合式api两种使用方式-快速入门demo原创 2023-07-24 17:46:45 · 1173 阅读 · 2 评论 -
vue中Img图片资源require导入时数据没有过来的时候报错了-解决方案
4. 未正确导入模块:如果使用了import语句,请确保正确导入了模块。如果没有正确导入模块,将无法找到模块并抛出上述错误。该错误表示在Vue组件或JavaScript文件中找不到名为“undefined-icon.svg”的模块。3. 文件格式错误:检查文件扩展名是否正确,确保文件格式与代码中使用的模块格式相匹配。,导致动态导入图片的路径出现了问题。1. 路径错误:检查文件路径是否正确,确保文件实际上存在于该路径下。2. 文件名错误:确保文件名正确拼写且与文件系统中的实际文件名匹配。原创 2025-02-14 11:32:55 · 168 阅读 · 0 评论 -
node运行项目-Network: unavailable-没有ip地址
vscode运行vue项目后发现Network: unavailable 是什么情况呢?可能有一下三种情况:1.多个网卡原因:打开网络共享中心,把多余的网络禁用掉,只留一个2.在中配置host及public3.系统环境变量问题。原创 2022-08-22 09:59:38 · 5652 阅读 · 2 评论 -
npm出错误node-sass\vendor\win32-x64-83\binding.node
项目目录发现node_modules\node-sass\vendor\win32-x64-83目录下为空。原创 2022-08-01 17:22:58 · 1816 阅读 · 0 评论 -
yarn : 无法加载文件 D:\ProgramFiles\nodejs\yarn.ps1,因为在此系统上禁止运行脚本
yarn : 无法加载文件 D:\ProgramFiles\nodejs\yarn.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170中的 about_Execution_Policies。原创 2022-07-05 12:08:09 · 2401 阅读 · 0 评论 -
Docker安装报错Hardware assisted virtualization and data execution protection must be enabled in the BIOS
Docker for Windows error: "Hardware assisted virtualization and data execution protection must be enabled in the BIOS"重要概念:镜像、容器镜像:可以理解为软件安装包,可以方便的进行传播和安装。容器:软件安装后的状态,每个软件运行环境都是独立的、隔离的,称之为容器。安装桌面版:Docker Desktop for Mac and Windows | Docker服务器版.原创 2022-02-28 08:25:44 · 15037 阅读 · 2 评论 -
android studio - React Native环境搭建出现run-android后报sdk错误处理-案例
执行命令run-android - 错误内容error Failed to install the app. Please accept all necessary Android SDK licenses using Android SDK Manager: "$ANDROID_HOME/tools/bin/sdkmanager --licenses"..........处理1、正确安装android studio2、正确设置ANDROID_HOME环境变量3、正确安装jdk..原创 2021-11-15 10:37:22 · 1586 阅读 · 0 评论 -
Vue提示warn[vue-router] Named Route ‘home’ has a default child route…
问题复现Vue的项目中使用了Vue-Router,当某个路由有子级路由时export default new Router({ routes: [ { path: '/', name: 'home', component: Home, children:[ { path:'conl', name: 'console', component: Console,原创 2021-10-26 15:00:05 · 764 阅读 · 0 评论 -
git SSL certificate problem: unable to get local issuer certificate-解决问题
问题描述git获取或推送项目的时候提示git SSL certificate problem: unable to get local issuer certificate问题是由于没有配置信任的服务器HTTPS验证。默认,cURL被设为不信任任何CAs,就是说,它不信任任何服务器验证。解决git config --global http.sslVerify false...原创 2021-09-23 13:34:04 · 1883 阅读 · 1 评论 -
Error in nextTick: “TypeError: Converting circular structure to JSON
[Vue warn]: Error in nextTick: "TypeError: Converting circular structure to JSON --> starting at object with constructor 'Vue' | property '$options' -> object with constructor 'Object' | property 'router' -> object with constr...原创 2021-08-09 18:35:12 · 2700 阅读 · 1 评论 -
MetaMask遇到了一个错误Try again by closing and reopening the-BUG
BUGMetaMask 遇到了一个错误Try again by reloading the page, or contact support 这里.错误详情信息:Incorrect locale information provided代码:RangeError栈:RangeError: Incorrect locale information provided at new DateTimeFormat (<anonymous>) at r.getTrans...原创 2021-05-28 14:51:17 · 4346 阅读 · 1 评论 -
vue-cli开启gzip打包报错TypeError: Cannot read property ‘tapPromise‘ of undefined-解决
给项目增加gzip打包yarn add compression-webpack-plugin -D(默认安装的是7以上的最新版本)修改vue.config.jsconst CompressionWebpackPlugin = require('compression-webpack-plugin'); configureWebpack: { plugins: [ new CompressionWebpackPlugin({ filename: '[p原创 2021-05-27 13:07:24 · 779 阅读 · 1 评论 -
npm i安装包依赖时 gyp ERR! stack Error: Can‘t find Python executable “python“, you can set the PYTHON env
报错内容gyp verb ensuring that file exists: C:\Python27\python.exegyp ERR! configure errorgyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.gyp verb could not find "python". checking python launchergyp v原创 2021-05-13 18:29:37 · 23596 阅读 · 3 评论 -
依赖包版本号更新 warning package.json: “dependencies“ has dependency “eslint“ with range “^6.8.0“
warning package.jsonwarning package.json: "dependencies" has dependency "eslint" with range "^6.8.0" that collides with a dependency in "devDependencies" of the same name with version "^6.7.2"想用各个依赖包的最新版本。如果手动去修改dependencies中各个包的版本号,那就太麻烦了,借助npm-ch.原创 2021-05-11 21:37:47 · 4680 阅读 · 0 评论 -
yarn使用报错:无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本
报错内容报错:无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本全局安装 yarnnpm install yarn@latest -g1.win+X键,使用管理员身份运行power shell2.输入命令:set-executionpolicy remotesigned3.输入”Y“,回车,问题解决。...原创 2021-05-11 14:18:41 · 2923 阅读 · 0 评论 -
nrm安装使用报错 internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, ‘string‘, value)--解决方案
报错内容C:\Users\user>nrm testinternal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, 'string', value); ^[TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (internal/va原创 2021-05-10 17:47:19 · 576 阅读 · 0 评论 -
Vue循环问题-[Vue warn]: You may have an infinite update loop in a component render function-解决-在线案例
[Vue warn]: You may have an infinite update loop in a component render function.在组件呈现函数中可能有一个无限更新循环在循环过程中,修改到了循环对象,从而引发了无限循环,此时vue会发出警告,但并没有真正产生死循环。你的确导致了一个无限循环, 因为array.sort()改变了数组自身,导致了过滤器又一次被触发。确保在副本上对数组排序:return value.slice().sort(...)分析...原创 2021-04-28 11:46:25 · 5264 阅读 · 0 评论 -
nodejs报错信息nodemon运行提示错误:无法加载文件 C:\Users\gxf\AppData\Roaming\npm\nodemon.ps1在此系统上禁止运行脚本。
nodemon运行 提示错误:无法加载文件 C:\Users\gxf\AppData\Roaming\npm\nodemon.ps1,因为在此系统上禁止运行脚本。这是你笔记本禁止运行脚本,解决办法1.管理员身份打开powerShell2.输入set-ExecutionPolicy RemoteSigned3 选择Y 或者A ,就好了...原创 2020-05-16 23:46:25 · 810 阅读 · 0 评论 -
React-使用中报错处理ERROR
React常见错误①Uncaught SyntaxError: Inline Babel script: Adjacent JSX elements must be wrapped in an enclosing tag虚拟DOM中只能有一个根标签②Warning: Invalid DOM property `class`. Did you mean `className`? in div在react的jsx语法中,class是一个类的关键词,所以标签的class属性要改为classN..原创 2020-06-29 22:34:16 · 1795 阅读 · 0 评论 -
Vue-使用中报错处理ERROR
Vue常见错误解析vue.js:634 [Vue warn]: Do not mount Vue to <html> or <body> - mount to normal elements instead.vue实例只能挂在到普通的元素标签上,不能是html、body标签,而且推荐使用id选择器来获取标签[Vue warn]: Property or method "XXX" is not defined on the instance but referenced原创 2020-06-29 22:30:15 · 1804 阅读 · 0 评论 -
Named Route index has a default child route. When navigating to this named route to name index
⚠警告[vue-router] Named Route 'index' has a default child route. When navigating to this named route (:to="{name: 'index'"), the default child route will not be rendered. Remove the name from this route and use the name of the default child route for nam.原创 2020-06-15 22:08:08 · 4118 阅读 · 0 评论 -
vue中router路由重复跳转Avoided redundant navigation to current location Redirected when going from...
在使用ElementUI中的导航时,默认情况下如果重复点击某选项,会报错。element-ui.common.js?b705:3354 Error: Avoided redundant navigation to current location: “/home/home1”.可以在router的配置文件中(router -> index.js)加上下面这句话,注意位置:import Vue from 'vue'import Router from 'vue-router'Vue原创 2020-06-14 18:36:15 · 1821 阅读 · 0 评论 -
Computed property “XXX” was assigned to but it has no setter错误
当你使用Vuex中state中状态时,在Vue中使用了v-model绑定数据报错原因组件中v-model=“XXX”,而XXX是vuex state中的某个变量 vuex中是单项流,v-model是vue中的双向绑定,但是在computed中只通过get获取参数值,没有set无法改变参数值解决在computed中添加get和set将v-model改成:value...原创 2020-06-14 11:38:28 · 2382 阅读 · 0 评论 -
使用element-ui时删除最后一页全部数据时显示无数据的bug修复
问题:element-ui的分页组件在你删除最后一页数据的时候默认的还是会显示在最后一页,此时最后一页已经没有数据了,所以就显示暂无数据,需要手动去跳转到第一页或者重新刷新页面才能看到第一页的数据解决:1.如果是删除最后一页的最后一条数据,则要跳转到第一页2.如果不是则继续显示在当前页中翻页组件<!-- 分页 page-size 每页展示的数据条数total 总数据条数current-change 页码点击事件--><el-paginatio.原创 2020-06-18 00:42:37 · 1743 阅读 · 1 评论