EddyVerbruggen / EddyVerbruggen/nativescript-nodeify

AWS AppSync Support

Open
#34 4 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
93
Forks
27
PR merge metrics
No merged PRs in 30d

Description

For a {N} app I'm working on, I was hoping to be able to add support for Amazon's new service AppSync through their app-sync npm module: [https://github.com/awslabs/aws-mobile-appsync-sdk-js](url)

I know nativescript-nodeify works for other amazon libraries including cognito, so I tried to use it to convert the appsync module to something I could use in {N} but I'm getting an error:

JavaScript error:
file:///app/tns_modules/setimmediate/setImmediate.js:175:64: JS ERROR TypeError: doc.createElement is not a function. (In 'doc.createElement("script")', 'doc.createElement' is undefined)

Here's my code:

import { Component, OnInit } from "@angular/core";
require("nativescript-nodeify");
const AWSAppSyncClient = require('aws-appsync').default;

@Component({
selector: "my-app",
template: `


`
})
export class AppComponent implements OnInit {
// Your TypeScript logic goes here

ngOnInit() {
console.log("onInit");

}
}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.