runner icon indicating copy to clipboard operation
runner copied to clipboard

3.2.1 onwards not working on Windows

Open steven-supersolid opened this issue 9 years ago • 2 comments
trafficstars

Example line from package.json:

"scripts": {
    "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.0.8} ./node_modules/.bin/mongodb-runner start"

This works fine up to and including version 3.2.0 but not from 3.2.1 onwards, which gives the error:

[Error: Could not find a MongoDB version matching {"version":"${MONGODB_VERSION:=3.0.8}","arch":"x86_64","platform":"win32","branch":"master","bits":"64","debug":false,"ext":".zip","distro":"2008plus-ssl"}]

Changing package.json gets a little further, in that the version is downloaded correctly. So perhaps a compatibility error with cross-env?

"scripts": {
    "pretest": "cross-env MONGODB_VERSION=3.0.8 ./node_modules/.bin/mongodb-runner start"

A symlink is then attempted but this step does not work unless the test is run in a DOS windows with admin access.

{ [Error: EPERM: operation not permitted, symlink 'C:\Users\Steven Shipton.mongodb\versions\mongodb-3.0.8-windows-64' -> 'C:\Users\Steven Shipton.mongodb\versions\mongodb-current'] errno: -4048, code: 'EPERM', syscall: 'symlink', path: 'C:\Users\Steven Shipton.mongodb\versions\mongodb-3.0.8-windows-64', dest: 'C:\Users\Steven Shipton.mongodb\versions\mongodb-current' }

steven-supersolid avatar Jul 01 '16 15:07 steven-supersolid

+1

rhuankarlus avatar Aug 09 '16 14:08 rhuankarlus

@satyasinha mongodb-js/version-manager#131 will fix this

imlucas avatar Sep 26 '18 20:09 imlucas