apollographql/apollo-link

Cannot read property 'request' of undefined - isTerminating

Opened this issue · 3 comments

Getting this error from apollo-link after upgrading apollo packages to version 3.1.3 -->

TypeError: Cannot read property 'request' of undefined
isTerminating
C:/Users/grosskue/Documents/apps/VCRM/client/packages/vcrmcomponents/node_modules/apollo-link/lib/bundle.esm.js:34
31 | return LinkError;
32 | }(Error));
33 | function isTerminating(link) {

34 | return link.request.length <= 1;
35 | }
36 | function toPromise(observable) {
37 | var completed = false;

Seeing this in the IDE -->
Could not find a declaration file for module 'apollo-link-logger'. 'c:/Users/grosskue/Documents/apps/VCRM/client/packages/vcrmcomponents/node_modules/apollo-link-logger/lib/index.js' implicitly has an 'any' type.
Try npm install @types/apollo-link-logger if it exists or add a new declaration (.d.ts) file containing `declare module 'apollo-link-logger';

$ npm install @types/apollo-link-logger --save

npm ERR! 404
npm ERR! 404 '@types/apollo-link-logger@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:

Changing -->
import apolloLogger from 'apollo-link-logger';

to:
const apolloLogger = require('apollo-link-logger');

cleared it up