fix: copy package.json to install dest for npm install

This commit is contained in:
zhi
2026-03-08 12:02:11 +00:00
parent 0569a5dcf5
commit c186eb24ec

View File

@@ -161,8 +161,9 @@ async function install() {
if (existsSync(destDir)) rmSync(destDir, { recursive: true, force: true }); if (existsSync(destDir)) rmSync(destDir, { recursive: true, force: true });
copyDir(SRC_DIST_DIR, destDir); copyDir(SRC_DIST_DIR, destDir);
// Copy openclaw.plugin.json // Copy openclaw.plugin.json and package.json
copyFileSync(join(__dirname, 'plugin', 'openclaw.plugin.json'), join(destDir, 'openclaw.plugin.json')); copyFileSync(join(__dirname, 'plugin', 'openclaw.plugin.json'), join(destDir, 'openclaw.plugin.json'));
copyFileSync(join(__dirname, 'plugin', 'package.json'), join(destDir, 'package.json'));
logOk(`Plugin files → ${destDir}`); logOk(`Plugin files → ${destDir}`);
// Install runtime deps into dest (express, ws) // Install runtime deps into dest (express, ws)