【发布时间】:2019-09-24 02:26:34
【问题描述】:
我正在尝试构建我的 android 应用程序并收到此错误。意思是 node_modules 文件夹中没有名为 kinvey 的导出成员。我刚刚从 nativescript 下载了该应用程序,并且我从以前的 nativescript 应用程序上传的文件夹收到了此错误,该应用程序已过期,但在上传之前在 nativescript 应用程序中有新的导入。请帮我修复这个错误,以便我可以运行我的代码!
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'.
这是加载页面代码
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
});
}
}
我所做的是将 backend.service.ts 页面添加到来自 nativescript 的代码示例中,但它不像我的旧应用程序那样具有它。密钥和密钥是错误的,尚未更新,但这不是问题,问题是节点模块中 kinvey 的导入
【问题讨论】:
标签: typescript nativescript kinvey