File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
packages/mongodb-memory-server-core/src Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import { promises as fspromises } from 'fs';
1919import { MongoClient } from 'mongodb' ;
2020import { lt } from 'semver' ;
2121import { EnsureInstanceError , StateError } from './util/errors' ;
22+ import * as os from 'os' ;
2223
2324const log = debug ( 'MongoMS:MongoMemoryServer' ) ;
2425
@@ -280,6 +281,13 @@ export class MongoMemoryServer extends EventEmitter implements ManagerAdvanced {
280281 this . stateChange ( MongoMemoryServerStates . starting ) ;
281282
282283 await this . _startUpInstance ( forceSamePort ) . catch ( async ( err ) => {
284+ // add error information on macos-arm because "spawn Unknown system error -86" does not say much
285+ if ( err instanceof Error && err . message ?. includes ( 'spawn Unknown system error -86' ) ) {
286+ if ( os . platform ( ) === 'darwin' && os . arch ( ) === 'arm64' ) {
287+ err . message += err . message += ', Is Rosetta Installed and Setup correctly?' ;
288+ }
289+ }
290+
283291 if ( ! debug . enabled ( 'MongoMS:MongoMemoryServer' ) ) {
284292 console . warn (
285293 'Starting the MongoMemoryServer Instance failed, enable debug log for more information. Error:\n' ,
You can’t perform that action at this time.
0 commit comments