【问题标题】:Strapi project showing URL is not defined显示 URL 的 Strapi 项目未定义
【发布时间】:2019-01-21 08:59:11
【问题描述】:

我正在尝试设置 Strapi 应用程序并运行该应用程序

我关注了这个文档

https://strapi.io/documentation/3.x.x/getting-started/installation.html#requirements https://strapi.io/documentation/3.x.x/getting-started/quick-start.html#_1-create-a-project

我已成功设置 steapi 并成功创建了应用程序。但是当我尝试使用strapi start 启动应用程序时,它显示以下错误。

【问题讨论】:

  • 你可以尝试使用节点 10 吗?
  • 在我的情况下,如果是由于节点版本。我有版本 8。我已经更新到节点 10,现在效果很好!

标签: javascript node.js strapi


【解决方案1】:

使用以下更新 C:\Users\hp\AppData\Roaming\npm\node_modules\strapi\lib\core\configurations.js 文件

this.config.admin.url = this.config.admin.devMode ? `http://${this.config.host}:4000/admin`:`http://${this.config.host}:1337/admin`;

更新项目目录config\hook.json文件如下

"timeout" : 7000

【讨论】:

  • 此解决方案有效。也可以将节点版本更新到 10
猜你喜欢
  • 2022-10-24
  • 2016-10-02
  • 2021-03-24
  • 2015-07-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多