Comments (8)
重新全局安装下,升级到最新的包 v1.1.1,昨天有个版本依赖有问题,如果还是同样报错请留言 😝
from lobe-cli-toolbox.
环境说明
笔记本电脑、系统:win11专业版22621.1702、openai key已设置、使用默认openai地址、git仓库为本地服务器自建gitlab
操作说明
重新安装
npm install -g @lobehub/commit-cli
使用
- 在D:\Git项目\lobe目录cmd
- git add .
- lobe
- 选择Use AI Commit
- 报错,报错内容如下:
D:\Git项目\lobe>lobe
Generating...
Error: Invalid environment; fetch is not defined
at new ChatGPTAPI (file:///C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/node_modules/chatgpt/build/index.js:174:13)
at M (file:///C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/dist/cli.js:3:862)
at file:///C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/dist/cli.js:3:2438
at commitHookEffectListMount (C:\Users\***\AppData\Roaming\npm\node_modules\@lobehub\commit-cli\node_modules\react-reconciler\cjs\react-reconciler.development.js:14778:26)
at commitPassiveMountOnFiber (C:\Users\***\AppData\Roaming\npm\node_modules\@lobehub\commit-cli\node_modules\react-reconciler\cjs\react-reconciler.development.js:16609:11)
at commitPassiveMountEffects_complete (C:\Users\***\AppData\Roaming\npm\node_modules\@lobehub\commit-cli\node_modules\react-reconciler\cjs\react-reconciler.development.js:16569:9)
at commitPassiveMountEffects_begin (C:\Users\***\AppData\Roaming\npm\node_modules\@lobehub\commit-cli\node_modules\react-reconciler\cjs\react-reconciler.development.js:16556:7)
at commitPassiveMountEffects (C:\Users\***\AppData\Roaming\npm\node_modules\@lobehub\commit-cli\node_modules\react-reconciler\cjs\react-reconciler.development.js:16544:3)
at flushPassiveEffectsImpl (C:\Users\***\AppData\Roaming\npm\node_modules\@lobehub\commit-cli\node_modules\react-reconciler\cjs\react-reconciler.development.js:19182:3)
at flushPassiveEffects (C:\Users\***\AppData\Roaming\npm\node_modules\@lobehub\commit-cli\node_modules\react-reconciler\cjs\react-reconciler.development.js:19127:14)
其他问题
- 选择 📝 docs - Add or update README and documentation
- 输入all
- 输入测试
- 输入No
- 报错,报错内容:
D:\Git项目\lobe>lobe
⠋ Committing...
[main 9479ffd] 📝 docs(all): 测试 [#No]
1 file changed, 0 insertions(+), 0 deletions(-)
ERROR The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received undefined
node:internal/errors:387:5
- NodeError (node:internal/errors:387:5)
- _write (node:internal/streams/writable:314:13)
- WriteStream.Writable.write (node:internal/streams/writable:336:10)
- Ink.writeToStdout (file:///C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/node_modules/ink/build/ink.js:241:29)
- (file:///C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/dist/cli.js:3:2105)
- commitHookEffectListMount (C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:14778:26)
- commitPassiveMountOnFiber (C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:16609:11)
- commitPassiveMountEffects_complete (C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:16569:9)
- commitPassiveMountEffects_begin (C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:16556:7)
- commitPassiveMountEffects (C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:16544:3)
- 查看日志,已提交到本地,未推送到仓库
from lobe-cli-toolbox.
应该是 node 18 以下 fetch polyfill 问题,我把依赖添加上了,你可以更新下或者升级 node 版本试试
from lobe-cli-toolbox.
应该是 node 18 以下 fetch polyfill 问题,我把依赖添加上了,你可以更新下或者升级 node 版本试试
已知问题情况
问题1:Error: Invalid environment; fetch is not defined
- 更新lobe-commit,问题未解决
- 升级node 版本到18.16.0,问题解决
问题2:ERROR The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received undefined
- 更新lobe-commit,问题解决
新增问题
- 更新lobe-commit后,选择 📝 docs - Add or update README and documentation,输入信息时输入英文非常卡顿、慢,并且如果删除输入的内容过快(比如按住Backspace键或者快速多次点击Backspace键),会出现多余字符h同时删除非常卡顿、慢
- 不输入OpenAI 的转发地址的话,即使笔记本电脑使用了代理软件比如v2rayN设置好api.openai.com走代理(非全局代理),也不会走代理,然后报错,报错内容应该就是指连接不上接口,报错内容如下:
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11457:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.then.promptTokens (file:///C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/node_modules/chatgpt/build/index.js:298:25)
- 使用lobe-coomit --init后,使用Use AI Commit - generate commit message by ChatGPT,会滚动出现无数的Generating,然后生成提交信息后也会重影,选择Use this message后出现hint: Waiting for your editor to close the file...,然后会弹出vscode编辑界面(这个弹出vscode编辑界面是基于默认应用吗?我想大概是,啊跑题了),图片如下所示:
from lobe-cli-toolbox.
- 如果 [3] 无法解决,我可以看看渲染性能优化的问题
- termianl 不会跟随系统代理,要单独设置,除非前置如路由侧就代理了
- windows 下如果是用原装 terminal 最好使用 windows terminal + powershell 7 内核,渲染比较好,不会出现这种重影换行
from lobe-cli-toolbox.
- 如果 [3] 无法解决,我可以看看渲染性能优化的问题
- termianl 不会跟随系统代理,要单独设置,除非前置如路由侧就代理了
- windows 下如果是用原装 terminal 最好使用 windows terminal + powershell 7 内核,渲染比较好,不会出现这种重影换行
环境说明
windows 下:PowerShell 7.4.0-preview.3、PowerShell 7.3.4
测试情况说明
使用 windows terminal + powershell 7 内核 7.4.0-preview.3和PowerShell 7.3.4:
from lobe-cli-toolbox.
2023-05-19.214037.mp4
@s544838371 增加了防抖,之前确实在长按退格时会出现卡顿,但还是无法复现重影
from lobe-cli-toolbox.
测试情况说明
2023.5.30更新后已知问题
- 重影问题,重影出现的前提是使用hook即,lobe -i,然后git commit的时候就会出现
录屏
20230530_172429.mp4
from lobe-cli-toolbox.
Related Issues (17)
- [Bug] WSL2中无法正常输入文字 HOT 2
- The automated release is failing 🚨
- Dependency Dashboard
- [Question] How to find JSON files in multi-level folders under locales. HOT 8
- [Bug] CERT_HAS_EXPIRED HOT 6
- [Bug] HOT 6
- md i18n bug HOT 2
- [Bug] Cannot read properties of undefined (reading 'text') HOT 5
- [Question] lobe-i18n cli run failed? HOT 8
- [Bug] Unreadable text in positive prompt HOT 1
- [Question] HOT 2
- prompt input is not at cursor HOT 1
- [Bug] macOS Terminal 重影 HOT 1
- [Question] ERROR Diff summary failed, please check your network or try again... HOT 2
- [Bug] Cannot read properties of null (reading 'useEffect') HOT 1
- [Request] lobe-i18n - Add more translation services HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lobe-cli-toolbox.