Not able to Configure GraphQL with Angular. NodeJS 14

Not able to Configure GraphQL with Angular. NodeJS 14


0

I have been trying to configure my angular project with graphql, angular-apollo but it’s not happening. My angular project is using NodeJS 14 Version

error

PS C:UsersadminDocumentsworkspacetechwarelab-websiteTechwareLab-Website> ng serve
Compiling @nguniversal/express-engine/tokens : es2015 as esm2015
Compiling ngx-captcha : es2015 as esm2015
Compiling ngx-owl-carousel-o : es2015 as esm2015
Compiling @nguniversal/express-engine : es2015 as esm2015

chunk {main} main.js, main.js.map (main) 2.08 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 720 bytes [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 164 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 1.48 MB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 346 kB [initial] [rendered]
Date: 2023-09-05T07:46:26.427Z - Hash: 026293c8ba4392b60854 - Time: 27447ms

ERROR in node_modules/apollo-angular/apollo.d.ts:81:21 - error TS2694: Namespace '"C:/Users/admin/Documents/workspace/techwarelab-website/TechwareLab-Website/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

81     static ɵfac: i0.ɵɵFactoryDeclaration<Apollo, [null, { optional: true; }, { optional: true; }, { optional: true; }]>;
                       ~~~~~~~~~~~~~~~~~~~~
node_modules/apollo-angular/apollo.d.ts:82:22 - error TS2694: Namespace '"C:/Users/admin/Documents/workspace/techwarelab-website/TechwareLab-Website/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'.    

82     static ɵprov: i0.ɵɵInjectableDeclaration<Apollo>;
                        ~~~~~~~~~~~~~~~~~~~~~~~
node_modules/apollo-angular/apollo-module.d.ts:5:21 - error TS2694: Namespace '"C:/Users/admin/Documents/workspace/techwarelab-website/TechwareLab-Website/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'. 

5     static ɵfac: i0.ɵɵFactoryDeclaration<ApolloModule, never>;
                      ~~~~~~~~~~~~~~~~~~~~
node_modules/apollo-angular/apollo-module.d.ts:6:21 - error TS2694: Namespace '"C:/Users/admin/Documents/workspace/techwarelab-website/TechwareLab-Website/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.
6     static ɵmod: i0.ɵɵNgModuleDeclaration<ApolloModule, never, never, never>;
                      ~~~~~~~~~~~~~~~~~~~~~
node_modules/apollo-angular/apollo-module.d.ts:7:21 - error TS2694: Namespace '"C:/Users/admin/Documents/workspace/techwarelab-website/TechwareLab-Website/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.
7     static ɵinj: i0.ɵɵInjectorDeclaration<ApolloModule>;
                      ~~~~~~~~~~~~~~~~~~~~~
node_modules/apollo-angular/query.d.ts:15:21 - error TS2694: Namespace '"C:/Users/admin/Documents/workspace/techwarelab-website/TechwareLab-Website/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.        

15     static ɵfac: i0.ɵɵFactoryDeclaration<Query<any, any>, never>;
                       ~~~~~~~~~~~~~~~~~~~~
node_modules/apollo-angular/query.d.ts:16:22 - error TS2694: Namespace '"C:/Users/admin/Documents/workspace/techwarelab-website/TechwareLab-Website/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'.     

** Angular Live Development Server is listening on localhost:4200, open your browser on https://localhost:4200/ **     

I suppose the version issue is there but still don’t have any clue what to do.

Here are the version
node : v14.21.3

ng --version
>>

     _                      _                 ____ _     ___ 
    /    _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △  | '_  / _` | | | | |/ _` | '__|   | |   | |    | | 
  / ___ | | | | (_| | |_| | | (_| | |      | |___| |___ | | 
    

Angular CLI: 9.1.15
Node: 14.21.3
OS: win32 x64

Angular: 9.1.13
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.15
@angular-devkit/build-angular     0.901.15
@angular-devkit/build-optimizer   0.901.15
@angular-devkit/build-webpack     0.901.15
@angular-devkit/core              9.1.15
@angular-devkit/schematics        9.1.15
@angular/cdk                      9.2.4
@angular/cli                      9.1.15
@angular/material                 9.2.4
@ngtools/webpack                  9.1.15
@nguniversal/builders             9.1.1
@nguniversal/common               9.1.1
@nguniversal/express-engine       9.1.1
@schematics/angular               9.1.15
@schematics/update                0.901.15
rxjs                              6.5.5
typescript                        3.8.3
webpack                           4.42.0

package.json Dependencies

"dependencies": {
    "@angular/animations": "~9.1.11",
    "@angular/cdk": "^9.2.4",
    "@angular/common": "~9.1.11",
    "@angular/compiler": "~9.1.11",
    "@angular/core": "~9.1.11",
    "@angular/forms": "~9.1.11",
    "@angular/material": "^9.2.4",
    "@angular/platform-browser": "~9.1.11",
    "@angular/platform-browser-dynamic": "~9.1.11",
    "@angular/platform-server": "~9.1.11",
    "@angular/router": "~9.1.11",
    "@apollo/client": "^3.8.2",
    "@nguniversal/express-engine": "^9.1.1",
    "animate.css": "^4.1.1",
    "aos": "^2.3.4",
    "apollo-angular": "^5.0.1",
    "bootstrap": "^4.6.0",
    "domino": "^2.1.6",
    "express": "^4.15.2",
    "graphql": "^14.0.0",
    "jquery": "^3.6.0",
    "ng6-toastr-notifications": "^1.0.4",
    "ngx-captcha": "^9.0.1",
    "ngx-owl-carousel-o": "^6.0.0",
    "rxjs": "~6.5.4",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2"
  },

New contributor

Shahid Raza is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


Load 5 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *