question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import ApolloModule according to instructions

See original GitHub issue

Hello,

I was following the instructions under the ‘Installation without Angular Schematics’ section of this documentation: https://www.apollographql.com/docs/angular/basics/setup/

After importing ApolloModule according to the instruction, I had the following: import { ApolloModule, APOLLO_OPTIONS } from "apollo-angular";

However, when I save the file I get a compiler error:

error TS2305: Module '"../../../../node_modules/apollo-angular/ngApollo"' has no exported member 'ApolloModule'.

2 import { ApolloModule, APOLLO_OPTIONS } from 'apollo-angular';

Intended outcome: I expected following the instructions exactly would not generate an error. If there is a different way to import the module for these instructions to work, it should be included in the instructions.

Actual outcome: The app fails to compile

How to reproduce the issue: Follow the instructions on the page listed above to observe that you cannot import the required module.

Versions This affects

  • apollo-client “^2.6.10”
  • apollo-angular “^2.0.4”
  • Angular 10

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

5reactions
DDoernercommented, Jan 19, 2021

@fetis The v2 documentation you linked still uses ApolloModule once. I’ve followed the page and had the same issue.

It’s not mentioned in the text, but still used in a code block:

@NgModule({
 imports: [BrowserModule, ApolloModule, HttpClientModule],
 ...
4reactions
fetiscommented, Oct 26, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular NativeScript apollo-angular has no export member ...
I'm very new to GraphQL and tried to use it with NativeScript Angular Project but as I install apollo-angular plugins it does not...
Read more >
Configuring Apollo projects - Apollo GraphQL Docs
Apollo projects are configured using an apollo.config.js file at the root of your project. Many Apollo tools leverage your Apollo config, reducing the...
Read more >
module has no exported member angular - You.com | The search ...
Unlike answers elsewhere, importing "Observable" did not help, ... According to the guide you need to import ApolloModule from "apollo-angular".
Read more >
Migration Guide – Angular - GraphQL Code Generator
import { NgModule } from '@angular/core' import ... -import { APOLLO_OPTIONS } from 'apollo-angular' +import { ApolloModule, ...
Read more >
Technical Appendix A Degree Thesis Submitted to the Faculty ...
instructions to add the layers it will be made up from. To make it simpler, an image is no more ... import {Apollo,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found