簡體   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'

我寫了一個命令來創建一個帶有自定義設置的新strapi應用程序。我以上述方式回答了自定義設置問題。當我選擇數據庫作為mongo時,我也通過了{useNewUrlParser:true,useUnifiedTopology:true}。但最后它顯示了連接測試失敗。所以我無法連接我的 mongo。請提出一些解決方案。

我認為你應該先啟動 mongodb 然后開始安裝

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM