# How to update the Odyssey Voyage II - Server (Airlock)

**URL:** <https://community.apollographql.com/t/how-to-update-the-odyssey-voyage-ii-server-airlock/6556>\
**Category:** Other Apollo Topics\
**Tags:** odyssey\
**Created:** [August 3, 2023, 2:16pm UTC](https://community.apollographql.com/t/how-to-update-the-odyssey-voyage-ii-server-airlock/6556 "2023-08-03T14:16:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xibaozhi0](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/xibaozhi0/32/4318_2.png) [@xibaozhi0](https://community.apollographql.com/u/xibaozhi0)\
**Post date:** [August 3, 2023, 2:16pm UTC](https://community.apollographql.com/t/how-to-update-the-odyssey-voyage-ii-server-airlock/6556/1 "2023-08-03T14:16:50Z")

</div>

I tried to update the Odyssey Voyage II - Server (Airlock) to the latest version, when I “npm run launch”, I got the error message:  
"…  
[accounts] Error occurred when executing command: npm start  
[accounts] Error: spawn cmd.exe ENOENT  
[accounts] at ChildProcess.\_handle.onexit (node:internal/child\_process:286:19)  
[accounts] at onErrorNT (node:internal/child\_process:484:16)  
[accounts] at process.processTicksAndRejections (node:internal/process/task\_queues:82:21)  
[accounts] npm start exited with code -4058  
node:internal/process/promises:289  
triggerUncaughtException(err, true /\* fromPromise \*/);  
^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason “[object Array]”.] {  
code: ‘ERR\_UNHANDLED\_REJECTION’  
}

Node.js v20.5.0,  
"

what should I do the next?

---

<div class="post-metadata">

**Author:** ![lizhennessy](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/lizhennessy/32/3894_2.png) [@lizhennessy](https://community.apollographql.com/u/lizhennessy)\
**Post date:** [August 3, 2023, 3:01pm UTC](https://community.apollographql.com/t/how-to-update-the-odyssey-voyage-ii-server-airlock/6556/2 "2023-08-03T15:01:09Z")

</div>

Hi there @xibaozhi0 ! I’m happy to take a look at this for you. I’ve just tried setting up the `server` code myself and haven’t encountered any problems. In the `monolith` directory, we should first run `npm install`; then `npm run launch`; and while that process is running, `npm start` in a third terminal. Could you walk me through the steps you took to try to launch the server, and when exactly the error occurs?

---

<div class="post-metadata">

**Author:** ![xibaozhi0](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/xibaozhi0/32/4318_2.png) [@xibaozhi0](https://community.apollographql.com/u/xibaozhi0)\
**Post date:** [August 4, 2023, 5:50am UTC](https://community.apollographql.com/t/how-to-update-the-odyssey-voyage-ii-server-airlock/6556/3 "2023-08-04T05:50:07Z")

</div>

hello, I am very glad to receive the reply so rapid. actually I run “npm install” and run “npm start” first and “Server ready at [http://localhost:4000/](http://localhost:4000/)”,in localhost:4000, it does not have any data except id and actually doesn’t work. when I “npm run launch”, the  
error message came. I use the nodejs.20.5.0 and windows 11, all packages version are latest. I want to know the  
.npmrc file in monolith, why “engine-strict=true”? I deleted this file. Is the error message related with this?

---

<div class="post-metadata">

**Author:** ![lizhennessy](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/lizhennessy/32/3894_2.png) [@lizhennessy](https://community.apollographql.com/u/lizhennessy)\
**Post date:** [August 7, 2023, 7:45pm UTC](https://community.apollographql.com/t/how-to-update-the-odyssey-voyage-ii-server-airlock/6556/4 "2023-08-07T19:45:02Z")

</div>

Thanks for the additional details @xibaozhi0! Could you copy and paste all of the output from running `npm run launch` for me here? I am going to try it out on my Windows computer and see if I get the same result (I tested on Mac, and didn’t see any issue.)

---

<div class="post-metadata">

**Author:** ![xibaozhi0](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/xibaozhi0/32/4318_2.png) [@xibaozhi0](https://community.apollographql.com/u/xibaozhi0)\
**Post date:** [August 17, 2023, 7:18am UTC](https://community.apollographql.com/t/how-to-update-the-odyssey-voyage-ii-server-airlock/6556/5 "2023-08-17T07:18:36Z")

</div>

thank you very much, now I solved the problems by using ‘child\_process’ replace “concurrently” , the block code is as the following:"  
const { exec } = require(‘child\_process’);  
const path = require(‘path’);

async function installService(command, name, cwd, prefixColor) {  
return new Promise((resolve, reject) =\> {  
const childProcess = exec(command, { cwd });

```
childProcess.stdout.on('data', data => {
  console.log(`[${name}] \x1b[${prefixColor}m${data.toString().trim()}\x1b[0m`);
});

childProcess.stderr.on('data', data => {
  console.error(`[${name}] \x1b[31m${data.toString().trim()}\x1b[0m`);
});

childProcess.on('close', code => {
  if (code !== 0) {
    reject(new Error(`[${name}] exited with code ${code}`));
  } else {
    resolve();
  }
});

```

});  
}

async function main() {  
try {  
const accounts = installService(‘npm install’, ‘accounts’, path.resolve(\_\_dirname, ‘…/…/services/accounts’), ‘blue’);  
const listings = installService(‘npm install’, ‘listings’, path.resolve(\_\_dirname, ‘…/…/services/listings’), ‘magenta’);  
const bookings = installService(‘npm install’, ‘bookings’, path.resolve(\_\_dirname, ‘…/…/services/bookings’), ‘green’);  
const reviews = installService(‘npm install’, ‘reviews’, path.resolve(\_\_dirname, ‘…/…/services/reviews’), ‘yellow’);

```
await Promise.all([accounts, listings, bookings, reviews]);

console.log('All services installed successfully.');

```

} catch (error) {  
console.error(‘Error in installing dependencies’, error);  
throw new Error(‘Cannot install dependencies.’);  
}  
}

main();  
"

---

<div class="post-metadata">

**Author:** ![Justin\_Gonzalez](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/justin_gonzalez/32/5359_2.png) [@Justin\_Gonzalez](https://community.apollographql.com/u/Justin_Gonzalez)\
**Post date:** [February 6, 2025, 8:48pm UTC](https://community.apollographql.com/t/how-to-update-the-odyssey-voyage-ii-server-airlock/6556/6 "2025-02-06T20:48:27Z")

</div>

Archived on February 6, 2025, 8:48pm UTC


