当安装 cms-form-b​​uilder composer 失败时,无法生成 package-lock.json

问题描述

我是 Orocommerce、交响乐和作曲家的新手。
我只是安装了一个干净版本的 Orocommerce(AWS 图像)并尝试使用 Composer 安装 cms-form-b​​uilder。

当我跑步时 PHP bin/composer 需要 b2bcodext/cms-form-b​​uilder

我收到以下错误

Updating the "config/parameters.yml" file
> Oro\Bundle\InstallerBundle\Composer\ScriptHandler::setPermissions
> Oro\Bundle\InstallerBundle\Composer\ScriptHandler::updateAssets
npm install --no-audit --save-exact --no-optional --loglevel error
sh: line 0: exec: npm: not found
Script Oro\Bundle\InstallerBundle\Composer\ScriptHandler::updateAssets handling the update-assets event terminated with an exception
Installation Failed,reverting ./composer.json and ./composer.lock to their original content.
In ScriptHandler.PHP line 149:
  Failed to generate package-lock.json

不确定这意味着什么 - 任何帮助将不胜感激。

谢谢 史蒂夫

解决方法

npm:未找到

它说,应用程序找不到 NPM 来安装 JavaScript 依赖项。

如果您还没有安装 NPM,只需按照官方指南进行安装: https://www.npmjs.com/get-npm

或者,如果它已经安装,但应用程序不知道它在哪里,您可以使用应用程序配置选项明确提供 NPM 的路径:https://doc.oroinc.com/backend/bundles/platform/AssetBundle/#configuration