TrackAPI is not a constructor - Odyssey Lift-Off II

At the step “Querying live data”, I get a 500 error. When looking at Explorer logs I see:

  "errors": [
      "message": "TrackAPI is not a constructor",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "stacktrace": [
            "TypeError: TrackAPI is not a constructor",
            "    at Object.dataSources (/Users/jreizevoort/GitHub/Sites/apollo/odyssey-lift-off-part2/server/src/index.js:12:17)",
            "    at initializeDataSources (/Users/jreizevoort/GitHub/Sites/apollo/odyssey-lift-off-part2/server/node_modules/apollo-server-core/dist/requestPipeline.js:287:40)",
            "    at processGraphQLRequest (/Users/jreizevoort/GitHub/Sites/apollo/odyssey-lift-off-part2/server/node_modules/apollo-server-core/dist/requestPipeline.js:33:11)",
            "    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
            "    at async processHTTPRequest (/Users/jreizevoort/GitHub/Sites/apollo/odyssey-lift-off-part2/server/node_modules/apollo-server-core/dist/runHttpQuery.js:221:30)"

PS: I also tried copying the files from the “final” directory to make sure I did not make any typing errors. This did not help.

Thanks in advance for your help!

The cause of the problem was that I was running node 19.1.0. After moving to node 16.18.1 everything worked.

Glad you got it working @weesvisje and thank you for sharing the solution!

We’re also working on updating our starter code to be more explicit about what node versions it currently supports.