-
Notifications
You must be signed in to change notification settings - Fork 101
Code works on codesandbox, but not on my machine #187
Comments
I continue to struggle with the same issue. I think there's a dedupe problem somewhere in the chain.
I get the same error. Put if I remove the carrots and pin all of the versions (and delete node_modules and lock files), it works fine. Of course the odd part is that all of those versions are the most current. |
@LawJolla @akiran I am facing the same issue... I cannot understand what magic is going wrong, deleting lock files and node_modules has not helped. I see an issue where defaults in Apollo-link-state do not seem to actually set default in @client namespace in local cache, Please can you see what your local data with defaults looks like ? |
@peggyrayzis ^^ I think I found the issue. Defaults are not working on my local machine. dev environment: Mac OS. |
The defaults seem like they don't work because the @client directive is not working so the query blows up. (I think) Try rolling your modules back and clear your NPM cache. I went with
|
Having the same issue. Was working fine this morning before I npm installed :(. Was able to get it working the following versions. Thanks @LawJolla for saving the day! // package.json
{
"apollo-link": "1.0.7",
"apollo-client": "2.0.4",
"apollo-cache-inmemory": "1.1.0",
"apollo-utilities": "1.0.3",
"apollo-link-http": "1.3.2",
"apollo-link-state": "0.3.1"
} |
@pachomski yeah.. its a huge bug.. thats what happened to me . see workaround I just posted... #188 @LawJolla That does not work.. I finally found a workaround after spending like 12 hours... |
@pachomski You also need to change your mutation data, to do the same... i.e.
I just got both mutations and query working with that trick in |
The CodeSandbox isn't working locally for me either. I think it's because As for a fix, we're hoping to resolve the cause of the bug in |
Error is happening because of this line https://github.com/apollographql/apollo-link-state/blob/master/packages/apollo-link-state/src/index.ts#L76 |
Upgrading to the latest versions of |
Hi,
I am creating different examples to explore local state management with apollo. Recently, I am running into an issue where similar code work in one repo but fails in another repo.
I created a codesandbox to demostrate this issue.
Code works in this codesandbox.
https://codesandbox.io/s/v00rnlkr20
Button toggles between login and logout when we click on it.
But if I download the codesandbox code and run it on my machine, it fails with error
To make sure, it is not a problem with my machine, I requested my colleague to download code and run it on his machine. It doesn't work on his machine also, but it works on codesandbox.
The text was updated successfully, but these errors were encountered: