Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Windows space in path issues #180

Closed
dominic-p opened this issue May 1, 2019 · 3 comments · Fixed by #192
Closed

More Windows space in path issues #180

dominic-p opened this issue May 1, 2019 · 3 comments · Fixed by #192

Comments

@dominic-p
Copy link
Contributor

This is a follow up from #139.

I thought the fix for that issue solved it, but when I tested again today. I got a new error:

Mongo[53261] MongodbInstance: is failed: Error: spawn "C:\Path to Binaries\bin\mongod.EXE" ENOENT +14ms
(node:14412) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of undefined
    at MongodbInstance._launchKiller (C:\Path to Project\my-project\node_modules\mongodb-memory-server\lib\util\MongoInstance.js:152:148)
    at C:\Path to Project\my-project\node_modules\mongodb-memory-server\lib\util\MongoInstance.js:105:35
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (C:\Path to Project\my-project\node_modules\mongodb-memory-server\lib\util\MongoInstance.js:16:103)
    at _next (C:\Path to Project\my-project\node_modules\mongodb-memory-server\lib\util\MongoInstance.js:18:194)

I think the issue might be related to this node.js bug which was not fixed. The workaround they mention is to quote the path to the command (already done in #139) and add shell: true to the spawn options.

I tried adding it here and it solved the problem, but I don't know if that's a good idea to do in all cases.

Maybe something like cross-spawn would be a better option?

@nodkz
Copy link
Collaborator

nodkz commented May 2, 2019

Cross-spawn looks good.
Can you make pull request?

@dominic-p
Copy link
Contributor Author

I can take a stab at it. Unfortunately, I don't have any TypeScript experience or yarn, so it will take some setup and a bit of time.

dominic-p added a commit to dominic-p/mongodb-memory-server that referenced this issue May 10, 2019
@dominic-p
Copy link
Contributor Author

Ok, I gave it a shot. As I said in the PR, I couldn't figure out how to test it locally though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants