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.

apollo-client does require process.env to be set since 2.4

See original GitHub issue

Intended outcome: I wanted to use the apollo-client library for grapqhl requests in my nativescript application.

Actual outcome: The code failed, since no apollo-client was instanciated. After debugging, we found out that the code references the non existing variable process.env.NODE_ENV multiple times.

How to reproduce the issue: Create a nativescript app and add the apollo client with version 2.5 and up.

Versions

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
benjamncommented, Apr 5, 2019

I believe this is something we can fix by polyfilling process in the ts-invariant package. It’s definitely not a concern that anyone using the Apollo Client libraries should have to worry about. Sorry for the annoyance!

0reactions
brainkimcommented, Oct 2, 2021

@uhoh-itsmaciek I’m happy to help. Can you open another issue and ping me so this doesn’t get lost in the weeds? Also if you have a screenshot of the stack trace that would be incredibly helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating to Apollo Server 4 - Apollo GraphQL Docs
In Apollo Server 3, immediately after constructing each DataSource subclass, Apollo Server invokes the dataSource.initialize({ cache, context }) function on ...
Read more >
Migrating to Apollo Client 3.0 - Apollo GraphQL Docs
This article walks you through migrating your application to Apollo Client 3.0 from previous versions of Apollo Client. To illustrate the migration process, ......
Read more >
Advanced HTTP networking - Apollo GraphQL Docs
Take full network control with Apollo Link. The Apollo Link library gives you fine-grained control of HTTP requests that are sent by Apollo...
Read more >
Setting up Apollo Client | Full-Stack Quickstart
Apollo Client is view-layer agnostic, so you can use it with any of your favorite view layers such ... The ApolloClient constructor requires...
Read more >
@apollo/client | Yarn - Package Manager
Apollo Client is a fully-featured caching GraphQL client with integrations for React, Angular, and more. It allows you to easily build UI components...
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