mongodb-js / mongodb-prebuilt

Install MongoDB prebuilt package using npm https://npmjs.org/package/mongodb-prebuilt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install failed because of unsupported linux distribution

Tumetsu opened this issue · comments

I'm developing a web app on my Elementary OS machine (Ubuntu based distro). During install of this package I get following error:

Error: unsupported linux distribution {"os":"linux","dist":"elementary OS"}

I managed to track the problem into how tmongodb-prebuilt uses mongodb-download package in the install.js script. If platform where mongodb should run is not defined, mongodb-download will get the OS name through require('os') according to its documentation

I'm fairly sure that my machine is compatible with mongodb since I have instance of it running already, and since my distro is based on Ubuntu. What would be best way to solve the error caused my the OS's name? Would it make sense to be able to configurate mongodb-prebuilt to take the platform argument or should I look into mongodb-download's way to distinguish supported platforms?

I had to look deeper. Turned out that mongodb-downloader has list of supported OSes embedded in the code so I had to edit that package to support my OS.