简体   繁体   English

无法使用带连接器连接到 mongodb

[英]Cannot connect to mongodb with strapi

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'

I wrote a command to create a new strapi app with custom settings.I answered the custom setting questions in above manner.When i choose database as mongo I also passed {useNewUrlParser: true, useUnifiedTopology: true}.But at last it is showing connection test failed.So i am unable to connect with my mongo.Please suggest some solution.我写了一个命令来创建一个带有自定义设置的新strapi应用程序。我以上述方式回答了自定义设置问题。当我选择数据库作为mongo时,我也通过了{useNewUrlParser:true,useUnifiedTopology:true}。但最后它显示了连接测试失败。所以我无法连接我的 mongo。请提出一些解决方案。

I think that You should start mongodb first then start with installation我认为你应该先启动 mongodb 然后开始安装

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM