【问题标题】:Cannot connect to mongodb with strapi无法使用strapi连接到mongodb
【发布时间】:2021-04-15 13:02:20
【问题描述】:
PS C:\Users\mihir\Desktop\node leraning\strapi_practice> npx create-strapi-app first
npx: installed 92 in 92.729s
Creating a new Strapi application at C:\Users\mihir\Desktop\node leraning\strapi_practice\first.

? Choose your installation type 
? Choose your installation type Custom (manual settings)
? Choose your default database client 
? Choose your default database client mongo
? Database name: learn
? Database name: learn
? Host: cluster_link {useNewUrlParser: true, useUnifiedTopology: true}
? Host: cluster_link {useNewUrlParser: true, useUnifiedTopology: true}
? +srv connection: (false) true
? +srv connection: true
? Port (It will be ignored if you enable +srv): (27017)
? Port (It will be ignored if you enable +srv): 27017
? Username: mihir
? Username: mihir
? Password: ****************
? Password: ****************
? Authentication database (Maybe "admin" or blank):
? Authentication database (Maybe "admin" or blank):
? Enable SSL connection: (y/N) y
? Enable SSL connection: Yes
⛔️ Connection test failed: EPERM: operation not permitted, lstat 'C:\Users\mihir\AppData\Local\Temp\strapiff50605eed47\node_modules\strapi-connector-mongoose\node_modules\.bin'

我写了一个命令来创建一个带有自定义设置的新strapi应用程序。我以上述方式回答了自定义设置问题。当我选择数据库作为mongo时,我也通过了{useNewUrlParser:true,useUnifiedTopology:true}。但最后它显示连接测试失败。所以我无法连接到我的 mongo。请提出一些解决方案。

【问题讨论】:

    标签: node.js mongodb strapi


    【解决方案1】:

    我认为你应该先启动mongodb然后开始安装

    【讨论】:

      猜你喜欢
      • 2020-10-01
      • 1970-01-01
      • 2019-04-04
      • 2021-04-01
      • 2015-01-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多