Strapi 服务器无法正常启动。 /文档/:policy.split 不是函数

Strapi Server wasn't able to start properly. /documentation/: policy.split is not a function

我最近在启动 strapi 应用程序时遇到了这个错误。之前一切都很好。我一直在寻找,但仍然不知道如何解决这个问题。以前有人遇到过这个错误吗?

> strapi start

[2021-01-23T11:19:49.618Z] debug ⛔️ Server wasn't able to start properly.
[2021-01-23T11:19:49.619Z] error Error creating endpoint get /documentation/: policy.split is not a function or its return value is not iterable

请注意,我的应用没有路径 /documentation。除了其文档的 strapi 默认路径。

这是我的应用程序依赖项,我尝试使用节点 10、12、14、15。它们都有相同的错误:

    "dateformat": "^3.0.3",
    "excel4node": "^1.7.2",
    "nodemailer": "^6.4.11",
    "os": "^0.1.1",
    "sha256": "^0.2.0",
    "strapi": "3.0.0-beta.20.3",
    "strapi-admin": "3.0.0-beta.20.3",
    "strapi-connector-mongoose": "3.0.0-beta.20.3",
    "strapi-plugin-content-manager": "3.0.0-beta.20.3",
    "strapi-plugin-content-type-builder": "3.0.0-beta.20.3",
    "strapi-plugin-documentation": "^3.0.0-beta.20.3",
    "strapi-plugin-email": "3.0.0-beta.20.3",
    "strapi-plugin-upload": "3.0.0-beta.20.3",
    "strapi-plugin-users-permissions": "3.0.0-beta.20.3",
    "strapi-utils": "3.0.0-beta.20.3",
    "uuid": "^8.3.1",
    "xlsx": "^0.16.5"

请按照以下步骤操作:

  1. ^3.0.0-beta.20.3 替换为 strapi-plugin-documentation 依赖项中的 3.0.0-beta.20.3。 (注意删除 ^)。
  2. 删除 package-lock.jsonyarn.lock 文件。
  3. 重新安装依赖项。

现在重新运行 Strapi,问题必须解决。