作者归档:beiyu
npm WARN config global `–global`, `–local` are deprecated. Use `–location=global` instead. 问题解决
安装使用commitizen
安装配置git commit规范插件:commitlint+husky
Bootstrap4 中下拉菜单 Dropdown 触发方式改为鼠标浮动触发
解决Bootstrap dropdown-menu一级菜单点击问题
vue3+vite+element-plus下使用unplugin-auto-import自动导入,并解决eslint、typescirpt变量报错问题
vue3 + vue-router4配置动态路由问题:[Vue Router warn]: No match found for location with path
Expected “fontFamily.sans” to be “fontfamily.sans” value-keyword-case
Unexpected invalid position @import rule no-invalid-position-at-import-rule
ios下input type=”date” text-align不生效问题
1 |
input::-webkit-date-and-time-value{ text-align:left; } |
参考
Git修改已经提交的用户名信息
1 2 3 4 5 6 7 8 9 10 11 12 13 |
# 第一步,(n)代表提交次数 git rebase -i HEAD~n # 第二步然后按`i`编辑,把`pick` 改成 `edit`,按'Esc'退出编辑,按`:wq`保存退出 # 第三步 git commit --amend --author="作者 <邮箱@xxxx.com>" --no-edit # 第四步 git rebase --continue # 第五步 git push --force |
Unknown at rule @tailwind scss(unknownAtRules)
uniapp vue3 script setup调用引入的微信小程序自定义组件里的方法
uniapp vant-weapp使用van-dropdown下拉菜单点击第二个后再点击第一无法触发点击关闭问题
uniapp vite vue3小程序修改子组件样式问题
使用redis-cli
找到redis安装目录,配置环境变量
1 2 3 4 |
PS C:\Users\beiyu> redis-cli 127.0.0.1:6379> get name "Lear" 127.0.0.1:6379> |
Error: Couldn’t find preset “stage-0” relative to directory
Error: Couldn’t find preset “es2015” relative to directory
问题
使用babel转换代码时报如下错误:
1 2 3 4 5 6 7 8 9 10 11 12 |
PS H:\project\nodejs\demo\learn\chapter3\3.11> babel .\test.js Error: Couldn't find preset "es2015" relative to directory "H:\\project\\nodejs\\demo\\learn" at G:\dev\nvm\v14.17.4\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:293:19 at Array.map (<anonymous>) at OptionManager.resolvePresets (G:\dev\nvm\v14.17.4\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:275:20) at OptionManager.mergePresets (G:\dev\nvm\v14.17.4\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:264:10) at OptionManager.mergeOptions (G:\dev\nvm\v14.17.4\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:249:14) at OptionManager.init (G:\dev\nvm\v14.17.4\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:368:12) at File.initOptions (G:\dev\nvm\v14.17.4\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\index.js:212:65) at new File (G:\dev\nvm\v14.17.4\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\index.js:135:24) at Pipeline.transform (G:\dev\nvm\v14.17.4\node_modules\babel-cli\node_modules\babel-core\lib\transformation\pipeline.js:46:16) at transform (G:\dev\nvm\v14.17.4\node_modules\babel-cli\lib\babel\util.js:50:22) |
1 2 3 4 |
.babelrc配置 { "presets": ["es2015", "stage-0"] } |
解决
安装 ES 标准
1 |
npm i -D babel-preset-es2015 |
再次运行
1 2 3 4 5 6 |
PS H:\project\nodejs\demo\learn\chapter3\3.11> babel .\test.js "use strict"; var a = 1, b = 2, c = 3; |