-1

I am trying to build my android application and im receiving this error. It is saying that there is no exported member named kinvey in the node_modules folder. i just downloaded the app from nativescript and i am recieving this error with a folder i uploaded from a previous nativescript application thats out of date but there was new importation in the nativescript app before upload. pleases help me fix this error so i can run my code!

 ERROR in app/shared/backend.service.ts:2:10 - error TS2305: Module '"C:/Users/elish/Downloads/bandz/node_modules/kinvey-nativescript-sdk/lib/nativescript"' has no exported member 'Kinvey'.

here is the loading page code

import { Kinvey } from "kinvey-nativescript-sdk";
import { Injectable } from "@angular/core";
import { Kinvey } from "kinvey-nativescript-sdk";

export class BackendService {
    static kinveyAppKey = "kid_SyY8LYO8M";
    static kinveyAppSecret = "09282985d7c540f7b076a9c7fd884c77";
    static kinveyUsername = "admin";
    static kinveyPassword = "admin";

    static setup() {
        Kinvey.init({
            appKey: BackendService.kinveyAppKey,
            appSecret: BackendService.kinveyAppSecret
        });
    }
}

what i did was added the backend.service.ts page to the code sample from nativescript aswell as it didnt have it like my old app did. the key and secret key is wrong and havent updated it yet but thats not the problem the problem is the importation for the kinvey in the node module

2 Answers2

2

Please refer the docs and use right import statement.

import * as Kinvey from "kinvey-nativescript-sdk";

There is no member exported as Kenvy, either you directly import init method or use *.

Manoj
  • 21,753
  • 3
  • 20
  • 41
0

Check whether your imported the KinveyModule in app.module.ts

yoosuf
  • 29
  • 3