apollographql/supergraph-demo

README not working: subgraph service doesn't start

6peterlu opened this issue · 1 comments

after make demo, I get this crash log inside the subgraph services (like inventory, for example):

/usr/src/app/node_modules/@apollo/federation/dist/composition/validate/preNormalization/tagDirective.js:10

const errorsMessagesToFilter = directives_1.federationDirectives.map((directive) => `Unknown directive "@${directive.name}".`);

                                                                 ^


TypeError: Cannot read properties of undefined (reading 'map')

    at Object.<anonymous> (/usr/src/app/node_modules/@apollo/federation/dist/composition/validate/preNormalization/tagDirective.js:10:66)

    at Module._compile (node:internal/modules/cjs/loader:1101:14)

    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)

    at Module.load (node:internal/modules/cjs/loader:981:32)

    at Function.Module._load (node:internal/modules/cjs/loader:822:12)

    at Module.require (node:internal/modules/cjs/loader:1005:19)

    at require (node:internal/modules/cjs/helpers:102:18)

    at Object.<anonymous> (/usr/src/app/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.js:6:22)

    at Module._compile (node:internal/modules/cjs/loader:1101:14)

    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)

How can I fix this? Thanks!

@6peterlu this was an out-of-date dependency that was fixed on 11/22/21 in d5faeba. Sorry for the inconvenience.

Underlying fix in composition: https://github.com/apollographql/federation/blob/version-0.x/federation-js/CHANGELOG.md#v0337