Node.js 为什么我的shelljs命令没有执行?

Node.js 为什么我的shelljs命令没有执行?,node.js,Node.js,我有一个商店应用程序,用户可以在那里试用我的应用程序。我有可能安装php应用程序和nodejs应用程序。它可以工作,但我的论坛应用程序,我有更新自己的功能。当我手动安装论坛应用程序并使用forever start启动它时,它可以工作,但当我使用shop试用版时,shelljs命令在论坛更新程序中不起作用。代码行如下所示: router.post("/", async (req, res) => { await shellPromise("rm -rf ..

我有一个商店应用程序,用户可以在那里试用我的应用程序。我有可能安装php应用程序和nodejs应用程序。它可以工作,但我的论坛应用程序,我有更新自己的功能。当我手动安装论坛应用程序并使用forever start启动它时,它可以工作,但当我使用shop试用版时,shelljs命令在论坛更新程序中不起作用。代码行如下所示:

router.post("/", async (req, res) => {
  await shellPromise("rm -rf ../update");
  await shellPromise("rm -rf ./Updates");

  await shellPromise(
    `git clone https://github.com/miko1991/inforum2.git ../update`
  );

  await shellPromise(
    "git clone https://github.com/miko1991/inforum2_updates.git ./Updates"
  );

  await shellPromise("rm -rf ./Updates/.git");

  await shellPromise("cp ../update/package.json ../");

  if (process.env.NODE_ENV === "production") {
    await shellPromise("cp -R ../update/client/build ../client");
  } else {
    await shellPromise("cp ../update/package.json ../client && yarn");
    await shellPromise("cp -R ../update/client/src ../client");
  }

  if (process.env.NODE_ENV === "production") {
    await shellPromise("cp ../update/server/package.json ./ && yarn");
    await shellPromise("cp -a ../update/server/. ./");

    res.sendStatus(204);
    process.exit(1);
  } else {
    res.sendStatus(204);
    await shellPromise("cp ../update/server/package.json ./ && yarn");
    await shellPromise("cp -a ../update/server/. ./");
  }
});