我最近在启动strapi app时遇到了这个错误。之前一切都很好。我一直在寻找,但仍然没有线索如何解决这个问题。以前有人遇到过这个错误吗?
> 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"
请按照以下步骤操作:
- 从
strapi-plugin-documentation
依赖中替换^3.0.0-beta.20.3
为3.0.0-beta.20.3
。(注意删除^
)。 删除 - 重新安装依赖项。
package-lock.json
或yarn.lock
文件。现在重新运行Strapi,问题必须解决。
删除表/模式,然后重新创建它,回到终端并运行start。错误将消失,服务器将正常运行。这将在下一个stripe版本中修复:解决方案:Strapi服务器启动错误