Open dilipkumar2k6 opened 6 years ago
http://lmgtfy.com/?q=getaddrinfo+ENOTFOUND+fastdl.mongodb.org+fastdl.mongodb.org%3A443
Could be either about you missing/bad an internet connection when installing the package.
I saw the post on mongoose
. But for me, I don't think I have bad internet connection while installing the modules. I am able to install yarn add mongodb-prebuilt
without any error, however, the problem I am facing is to install mongo-in-memory
. Also, I am able to do curl fastdl.mongodb.org
. Following is complete error log for reference.
git:develop ✗ ⚑ $ yarn add mongo-in-memory --dev
yarn add v1.5.1
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
[1/1] ⢀ mongodb-prebuilt
[-/1] ⢀ waiting...
[-/1] ⢀ waiting...
[-/1] ⢀ waiting...
error An unexpected error occurred: "******/node_modules/mongo-in-memory/node_modules/mongodb-prebuilt: Command failed.
Exit code: 1
Command: sh
Arguments: -c node install.js
Directory: *******/node_modules/mongo-in-memory/node_modules/mongodb-prebuilt
Output:
events.js:183
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND fastdl.mongodb.org fastdl.mongodb.org:443
I've just tried npm install mongo-in-memory
and npm install mongodb-prebuilt@4.6.0
and it worked fine.
You can try the following:
1) npm install npm install mongodb-prebuilt@4.6.0
to check if the problem it's with version 4.6.0 of mongodb-prebuilt
2) You can use the command curl https://fastdl.mongodb.org
to see if the url is accessible from your Terminal/Command Prompt
What OS and version are you using?
yarn add mongodb-prebuilt@4.6.0
curl https://fastdl.mongodb.org
without any error
$ curl https://fastdl.mongodb.org
<html>
<head>
<meta http-equiv="refresh" content="1;url=https://www.mongodb.com/download-center" />
</head>
<body>
<a href="https://www.mongodb.com/download-center">MongoDB downloads</a>
</body>
</html>
macOS Sierra
on my office laptop, I am sure if you don't face similar issue then it could be somewhere related to my office network proxy.I think you should bump up version for mongodb-prebuilt
to latest one. I also noticed that mongodb
is old, seems like good time to bump this version as well.
I am getting following error while installing
yarn add mongo-in-memory
(or even withnpm
). Any help will be appreciated.