Comments (13)
would be my first. I should try tho :)
from mongodb-memory-server.
@cmosgh thanks for debugging. 👌
Can you provide you folder structure by path C:\Users\Username\.mongodb-binaries\3.4.4
?
Or maybe you can make PR, which will find mongod.exe
in these lines:
https://github.com/nodkz/mongodb-memory-server/blob/master/src/util/MongoBinaryDownload.js#L131-L133
and
https://github.com/nodkz/mongodb-memory-server/blob/master/src/util/MongoBinaryDownload.js#L71
Moreover, will be cool if you create an internal method for obtaining correct binary path according to OS something like:
class MongoBinaryDownload {
...
_getMongodPath(): string {
if (this.platform === 'win32') {
return __correct path___
} else {
return path.resolve(this.downloadDir, this.version, 'mongod');
}
}
}
from mongodb-memory-server.
I'm on MacOS and make a proper fix for Win quite hard for me.
Thanks for help!
from mongodb-memory-server.
MongoBinaryDownload looks for C:\Users\UserName\.mongodb-binaries\3.4.4\mongod
but the .mongodb-binaries contains only the zip archive and an empty folder folder 3.4.4
it seems that for some reason it doesn't extract the archive
from mongodb-memory-server.
So it look like that filter in decompress
contains incorrect value under win32
(problems with backslash)
https://github.com/nodkz/mongodb-memory-server/blob/master/src/util/MongoBinaryDownload.js#L123
from mongodb-memory-server.
I can give you the path it receives sec
from mongodb-memory-server.
ah its pretty simple I think. since macos doesn't need .exe
filter should have added .exe
and the path resolve should have the same appended
from mongodb-memory-server.
Yep needs to check this.platform === 'win32'
and if is true then use path and filter for windows, otherwise keep existed values for linux and mac.
Would you try to do PR?
from mongodb-memory-server.
created a pull request but it fails to build because of prettier
... haven't got that configured locally so..., maybe you can tho use the code?
from mongodb-memory-server.
Ok i'll do it.
Many thanks for PR!
from mongodb-memory-server.
Congrat with first PR 🎉
from mongodb-memory-server.
Published https://github.com/nodkz/mongodb-memory-server/releases/tag/v1.6.1
from mongodb-memory-server.
For what is worth set the binary.systemBinary
option (as listed at here) to point to the correct path on the filesystem (where npm postinstall actually downloads the binary). For me this systemBinary
is "X:\Project\Root\node_modules\mongodb-memory-server\node_modules\.cache\mongodb-memory-server\mongodb-binaries\x.y.z\mongod.exe" (note the double slash on Windows). Hope this helps, because even version 3.0.0 of this package wasn't working for me.
from mongodb-memory-server.
Related Issues (20)
- Randomizing db names for each test
- GridFS streams not working correctly HOT 4
- Jest + mongodb-memory-server + mongoose - Calling 'find' hangs indefinitely HOT 2
- Invalid version reported for version strings ending in -latest HOT 2
- Ubuntu >= 22.04 is unsupported when using MongoDB >= 6.0.4 HOT 7
- _startUpInstance threw a Error: TypeError: (intermediate value).finally is not a function HOT 3
- Mongod instance closed with code "127" HOT 7
- Case: InMemory DB refuses to update after Making changes to model HOT 7
- Library is missing or cannot be opened: "libcrypto.so.1.1" HOT 2
- 9.1.8 not working out of the box for node:20 docker (LTS images) HOT 5
- ReplicaSet - emulate replication lag HOT 1
- Issue downloading mongo binaries with Nexus set as MONGOMS_DOWNLOAD_MIRROR HOT 8
- Error when trying to run tests HOT 1
- Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1" HOT 8
- Requested Version "6.0.14" is not available for "Debian 12"! Available Versions: ">=7.0.3" HOT 1
- Mongod sometimes fails to start due to ETXTBSY HOT 10
- The download of the mongodb binary is corrupted when using a hoisted dependency in a monorepo HOT 4
- How to initialize data/collections/indexes on startup? HOT 1
- Fix Documentation path because of repository transfer HOT 1
- Occasional `StdoutInstanceError: Port "39697" already in use` with v10.0.0 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongodb-memory-server.