Coder Social home page Coder Social logo

amazon-archives / aws-mobile-react-native-notes-tutorial Goto Github PK

View Code? Open in Web Editor NEW
40.0 18.0 13.0 120.48 MB

Starter for the AWS Mobile React Native Tutorial

License: Apache License 2.0

JavaScript 70.28% Python 6.88% Java 5.23% Objective-C 17.61%

aws-mobile-react-native-notes-tutorial's Introduction

React Native Notes Tutorial

This project is a React Native Notes App that stores data only locally on the device. It works on iOS and Android.

To install, use:

$ yarn install

To run, use:

$ yarn run ios
$ yarn run android

Ensure that the Android emulator is running before starting the project.

aws-mobile-react-native-notes-tutorial's People

Contributors

adrianhall avatar jpeddicord avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-mobile-react-native-notes-tutorial's Issues

Error when deleting item after AppSync is integrated

The error is:

In this environment the sources for assign MUST be an object.  This error is a performance optimization and not spec compliant.

assign
Object.es6.js:43:10

deleteNote
graphql.js:66:24

onDeleteNote
NoteListScreen.js:209:30

_autoClose
index.js:265:17

onPress
index.js:428:39

The appropriate code in graphql.js is as follows:

    DeleteNote: graphql(DeleteNote, {
        options: {
            refetchQueries: [ { query: ListAllNotes } ]
        },
        props: props => ({
            deleteNote: (note) => {
                return props.mutate({
                    variables: note,
                    optimisticResponse: {
                        deleteNote: { ...note, __typename: 'Note' }
                    }
                })
            }
        })
    }),

Unable to yarn install?

warning Error running install script for optional dependency: "/Users/lemchiewchoon/Code/ReactNative/aws-mobile-react-native-notes-tutorial/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /Users/lemchiewchoon/Code/ReactNative/aws-mobile-react-native-notes-tutorial/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp info check checked for \"/Users/lemchiewchoon/Code/ReactNative/aws-mobile-react-native-notes-tutorial/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node\" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/lemchiewchoon/Code/ReactNative/aws-mobile-react-native-notes-tutorial/node_modules/node-pre-gyp/lib/util/compile.js:77:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:180:13)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:207:12)
node-pre-gyp ERR! stack     at onErrorNT (internal/child_process.js:379:16)
node-pre-gyp ERR! stack     at process._tickCallback (internal/process/next_tick.js:114:19)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command \"/usr/local/lib/node_modules/node/bin/node\" \"/Users/lemchiewchoon/Code/ReactNative/aws-mobile-react-native-notes-tutorial/node_modules/fsevents/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/lemchiewchoon/Code/ReactNative/aws-mobile-react-native-notes-tutorial/node_modules/fsevents
node-pre-gyp ERR! node -v v9.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.38
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)"

I'm hitting exceptions after cloning the project and executing yarn install.
Node version is v9.8.0 on MacOS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.