-
Notifications
You must be signed in to change notification settings - Fork 704
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
在win下安装插件失败,看代码应该是在路径转换问题。
Steps to Reproduce
- 在win下运行
opencli plugin install github:ByteYue/opencli-plugin-hot-digest - 提示安装成功,但实际无法使用。
- 每次运行opencli 都会提示:
⚠ Plugin hot-digest/aggregate.ts: Unknown file extension ".ts" for C:\Users\WSB.opencli\plugins\hot-digest\aggregate.ts
目前发现了几个问题:
-
plugin.ts 中,两个地方的:
const thisFile = new URL(import.meta.url).pathname
建议换为:
const thisFile = fileURLToPath(import.meta.url); -
在win下跨磁盘创建链接需要管理员权限,负责会失败,这个函数需要修正下:linkHostOpencli
-
node 无法正确加载 .ts 文件,目前好像没有解决完全:
(1) 目前报这个错误,不确定什么原因
Failed to transpile aggregate.ts: spawnSync D:\code\opencli\node_modules.bin\esbuild ENOENT -
建议在discovery.ts 中将discoverPluginDir 中对.ts 文件的支持取消。
Expected Behavior
修正此Bug
OpenCLI Version
1.3
Node.js Version
22.x
Operating System
Windows
Logs / Screenshots
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working