完整代码:
import sketch from 'sketch'
const AV = require('leancloud-storage');
const { Query, User } = AV;
export default function () {
AV.init({
appId: "------------",
appKey: "------------",
serverURL: "j1leA7xW.api.lncldglobal.com"
});
}
报错
MOJavaScriptException: ReferenceError: Can't find variable: window
av.js:16912:0
webpack_require av.js:30:0
av.js:16894:0
webpack_require av.js:30:0
av.js:4949:0
webpack_require av.js:30:0
av.js:73:0
av.js:74:10
webpackUniversalModuleDefinition av.js:3:0
av.js:10:1
安装方法:
$ npm install leancloud-storage --save
安装后能ping对应域名地址