如题,Koishi/4.16.1,node -v20.10.0,npm -10.2.3,yarn -1.22.21。
成功完成了创建模板项目,但是在创建插件时出现如下报错,求教一下如何正确操作
yarn setup @yumeshi/song -G
√ description: … 点歌
node:internal/errors:932
const err = new Error(message);
^Error: Command failed: git commit -m “initial commit”
at checkExecSyncError (node:child_process:890:11)
at execSync (node:child_process:962:15)
at Initiator.initGit (C:\PAND\order\koishi\try\emochan\node_modules@koishijs\scripts\lib\setup.js:191:38)
at async Initiator.write (C:\PAND\order\koishi\try\emochan\node_modules@koishijs\scripts\lib\setup.js:101:9)
at async Initiator.init (C:\PAND\order\koishi\try\emochan\node_modules@koishijs\scripts\lib\setup.js:74:9)
at async Initiator.start (C:\PAND\order\koishi\try\emochan\node_modules@koishijs\scripts\lib\setup.js:34:9) {
status: 128,
signal: null,
output: [ null, null, null ],
pid: 16484,
stdout: null,
stderr: null
}
目录以及编写测试插件yarn dev启动如下图
[W] config failed to resolve @yumeshi/koishi-plugin-song
[W] config Error: Cannot find module ‘C:\PAND\order\koishi\try\emochan\node_modules@yumeshi\koishi-plugin-song\lib\index.js’. Please verify that the package.json has a valid “main” entry
at tryPackage (node:internal/modules/cjs/loader:444:19)
at Module._findPath (node:internal/modules/cjs/loader:715:18)
at Module._resolveFilename (node:internal/modules/cjs/loader:1130:27)
at Module._resolveFilename (C:\PAND\order\koishi\try\emochan\node_modules\esbuild-register\dist\node.js:4787:36)
at Function.resolve (node:internal/modules/helpers:187:19)
at _PackageScanner.loadPackage (C:\PAND\order\koishi\try\emochan\node_modules@koishijs\registry\src\local.ts:62:29)
at _PackageScanner.loadDirectory (C:\PAND\order\koishi\try\emochan\node_modules@koishijs\registry\src\local.ts:51:18)
at async Promise.all (index 0)
at _PackageScanner._collect (C:\PAND\order\koishi\try\emochan\node_modules@koishijs\registry\src\local.ts:31:5)