Amplify-js: Can't find variable: setTimeout in react-native

Created on 13 Jul 2018  ·  3Comments  ·  Source: aws-amplify/amplify-js

I got this error when run react-native in release mode

screen shot 2561-07-13 at 20 48 42

investigating

Most helpful comment

I had the same issue, tried to reproduce it but it was really hard. I think it might have something to do with shared dependencies of amplify and appsync or it is some kind of race issue when installing the dependencies.

The solution for me was to remove the appsync dependencies from package.json, delete yarn.lock 😞, delete node_modules and reinstalling (yarn install). Thereafter I re-added the appsync dependencies and ran yarn install.

I was not able to consistently reproduce the error in a test repo so I think it might be some race issue when yarn installing 🤷‍♂️ or the order of calling yarn add ...

My yarn version is 1.3.2
react native version 0.56.0
amplify version 1.0.0
appsync version 1.2.1

All 3 comments

Hello, thanks for submitting an issue. Could you please provide a bit more detail.

  • Are you using a starter project or your own project with Amplify?
  • Which version of aws-amplify are you using?
  • Which version of react-native are you using?
  • Which version of Node are you using (node -v)?

I had the same issue, tried to reproduce it but it was really hard. I think it might have something to do with shared dependencies of amplify and appsync or it is some kind of race issue when installing the dependencies.

The solution for me was to remove the appsync dependencies from package.json, delete yarn.lock 😞, delete node_modules and reinstalling (yarn install). Thereafter I re-added the appsync dependencies and ran yarn install.

I was not able to consistently reproduce the error in a test repo so I think it might be some race issue when yarn installing 🤷‍♂️ or the order of calling yarn add ...

My yarn version is 1.3.2
react native version 0.56.0
amplify version 1.0.0
appsync version 1.2.1

Closing this issue. Feel free to reopen if you still have this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

guanzo picture guanzo  ·  3Comments

karlmosenbacher picture karlmosenbacher  ·  3Comments

callmekatootie picture callmekatootie  ·  3Comments

ldgarcia picture ldgarcia  ·  3Comments

cosmosof picture cosmosof  ·  3Comments