Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/473.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 我正试图用Stellar wallet解决此错误_Javascript_Stenciljs_Wallet_Stellar.js_Stellar - Fatal编程技术网

Javascript 我正试图用Stellar wallet解决此错误

Javascript 我正试图用Stellar wallet解决此错误,javascript,stenciljs,wallet,stellar.js,stellar,Javascript,Stenciljs,Wallet,Stellar.js,Stellar,然后每次运行stellar localhost时,我都会收到错误stellar wallet#undefined 我认为这与 const initializeComponent=async(elm、hostRef、cmpMeta、hmrVersionId、Cstr)但它仍然无法识别异步函数中的所有参数。如果你能找到解释所有论点的文档,那会很有帮助 这是全部代码 const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersion

然后每次运行stellar localhost时,我都会收到错误
stellar wallet#undefined

我认为这与
const initializeComponent=async(elm、hostRef、cmpMeta、hmrVersionId、Cstr)
但它仍然无法识别异步函数中的所有参数。如果你能找到解释所有论点的文档,那会很有帮助

这是全部代码

const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
// initializeComponent
if ((BUILD.lazyLoad || BUILD.hydrateServerSide || BUILD.style) && (hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
    if (BUILD.lazyLoad || BUILD.hydrateClientSide) {
        // we haven't initialized this element yet
        hostRef.$flags$ |= 32 /* hasInitializedComponent */;
        // lazy loaded components
        // request the component's implementation to be
        // wired up with the host element
        Cstr = loadModule(cmpMeta, hostRef, hmrVersionId);
        if (Cstr.then) {
            // Await creates a micro-task avoid if possible
            
            const endLoad = uniqueTime(`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`, `[Stencil] Load module for <${cmpMeta.$tagName$}>`);
            Cstr = await Cstr;
            endLoad();
        }
        console.log(BUILD.isDev);
        console.log(BUILD.isDebug);
        console.log(!Cstr);
        if ((BUILD.isDev || BUILD.isDebug) && !Cstr) {
            throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
        }
        if (BUILD.member && !Cstr.isProxied) {
            // we'eve never proxied this Constructor before
            // let's add the getters/setters to its prototype before
            // the first time we create an instance of the implementation
            if (BUILD.watchCallback) {
                cmpMeta.$watchers$ = Cstr.watchers;
            }
            proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
            Cstr.isProxied = true;
        }
        const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
        // ok, time to construct the instance
        // but let's keep track of when we start and stop
        // so that the getters/setters don't incorrectly step on data
        if (BUILD.member) {
            hostRef.$flags$ |= 8 /* isConstructingInstance */;
        }
        // construct the lazy-loaded component implementation
        // passing the hostRef is very important during
        // construction in order to directly wire together the
        // host element and the lazy-loaded instance
        try {
            new Cstr(hostRef);
        }
        catch (e) {
            consoleError(e);
        }
        if (BUILD.member) {
            hostRef.$flags$ &= ~8 /* isConstructingInstance */;
        }
        if (BUILD.watchCallback) {
            hostRef.$flags$ |= 128 /* isWatchReady */;
        }
        endNewInstance();
        fireConnectedCallback(hostRef.$lazyInstance$);
    }
    else {
        // sync constructor component
        Cstr = elm.constructor;
        hostRef.$flags$ |= 128 /* isWatchReady */ | 32 /* hasInitializedComponent */;
    }
    if (BUILD.style && Cstr.style) {
        // this component has styles but we haven't registered them yet
        let style = Cstr.style;
        if (BUILD.mode && typeof style !== 'string') {
            style = style[(hostRef.$modeName$ = computeMode(elm))];
            if (BUILD.hydrateServerSide && hostRef.$modeName$) {
                elm.setAttribute('s-mode', hostRef.$modeName$);
            }
        }
        const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);
        if (!styles.has(scopeId)) {
            const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
            if (!BUILD.hydrateServerSide && BUILD.shadowDom && BUILD.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
                style = await import('./shadow-css-3ef739e8.js').then(m => m.scopeCss(style, scopeId, false));
            }
            registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
            endRegisterStyles();
        }
    }
}
// we've successfully created a lazy instance
const ancestorComponent = hostRef.$ancestorComponent$;
const schedule = () => scheduleUpdate(hostRef, true);
if (BUILD.asyncLoading && ancestorComponent && ancestorComponent['s-rc']) {
    // this is the intial load and this component it has an ancestor component
    // but the ancestor component has NOT fired its will update lifecycle yet
    // so let's just cool our jets and wait for the ancestor to continue first
    // this will get fired off when the ancestor component
    // finally gets around to rendering its lazy self
    // fire off the initial update
      ancestorComponent['s-rc'].push(schedule);
  }
  else {
      schedule();
  }
};
const initializeComponent=async(elm、hostRef、cmpMeta、hmrVersionId、Cstr)=>{
//初始化组件
if((BUILD.lazyLoad | | | | | | | | | | | BUILD.style)&&(hostRef.$flags$&32/*hasInitializedComponent*/)==0){
if(BUILD.lazyLoad | | BUILD.hydroceClientSide){
//我们还没有初始化这个元素
hostRef.$flags$|=32/*hasInitializedComponent*/;
//延迟加载组件
//请求将组件的实现
//与主机元素连接
Cstr=加载模块(cmpMeta、hostRef、hmrVersionId);
如果(Cstr.then){
//如果可能,wait将创建一个微任务
const-endLoad=uniqueTime(`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`,`[Stencil]加载模块用于`);
Cstr=等待Cstr;
endLoad();
}
console.log(BUILD.isDev);
console.log(BUILD.isDebug);
控制台日志(!Cstr);
if((BUILD.isDev | | BUILD.isDebug)和&!Cstr){
抛出新错误(“${cmpMeta.$tagName$}{hostRef.$modeName$}”的构造函数未找到“);
}
if(BUILD.member&!Cstr.isProxied){
//我们以前从未代理过这个构造函数
//让我们先将getter/setter添加到它的原型中
//第一次创建实现的实例时
if(BUILD.watchCallback){
cmpMeta.$watchers$=Cstr.watchers;
}
代理组件(Cstr、cmpMeta、2/*代理状态*/);
Cstr.isProxied=true;
}
const endNewInstance=createTime('createInstance',cmpMeta.$tagName$);
//好了,是时候构建这个实例了
//但是让我们跟踪一下我们什么时候开始和停止
//这样getter/setter就不会错误地处理数据
if(BUILD.member){
hostRef.$flags$|=8/*isConstructingInstance*/;
}
//构造延迟加载的组件实现
//在比赛中传递hostRef是非常重要的
//为了将电缆直接连接在一起而进行的施工
//host元素和延迟加载的实例
试一试{
新的Cstr(hostRef);
}
捕获(e){
合并人(e);
}
if(BUILD.member){
hostRef.$flags$&=~8/*isConstructingInstance*/;
}
if(BUILD.watchCallback){
hostRef.$flags$|=128/*isWatchReady*/;
}
endNewInstance();
fireConnectedCallback(hostRef.$lazyInstance$);
}
否则{
//同步构造函数组件
Cstr=elm.constructor;
hostRef.$flags$|=128/*isWatchReady*/| 32/*hasInitializedComponent*/;
}
if(BUILD.style&&Cstr.style){
//此组件具有样式,但我们尚未注册它们
let style=Cstr.style;
if(BUILD.mode&&typeof style!=='string'){
style=style[(hostRef.$modeName$=computeMode(elm))];
if(BUILD.hydrateServerSide&&hostRef.$modeName$){
elm.setAttribute('s-mode',hostRef.$modeName$);
}
}
const scopeId=getScopeId(cmpMeta,hostRef.$modeName$);
如果(!styles.has(scopeId)){
常量endRegisterStyles=createTime('registerStyles',cmpMeta.$tagName$);
如果(!BUILD.hydrateServerSide&&BUILD.shadowDom&&BUILD.shadowDomShim&&cmpMeta.$flags$&8/*需要shadowDomShim*/){
style=等待导入('./shadow-css-3ef739e8.js')。然后(m=>m.scopeCss(style,scopeId,false));
}
registerStyle(scopeId,style,!!(cmpMeta.$flags$&1/*shadowDomEncapsulation*/);
endRegisterStyles();
}
}
}
//我们已经成功创建了一个惰性实例
常量ANCESTORCOMENT=hostRef.$ANCESTORCOMENT$;
const schedule=()=>scheduleUpdate(hostRef,true);
if(BUILD.asyncLoading&&ancestorComponent&&ancestorComponent['s-rc'])){
//这是初始负载,该组件有一个祖先组件
//但祖先组件尚未启动其将更新的生命周期
//所以,让我们先冷却我们的喷气机,然后等待祖先继续
//当祖先组件
//终于有机会表现出它懒惰的自我
//启动初始更新
取消存储组件['s-rc'].推送(时间表);
}
否则{
附表();
}
};

问题很可能出在您的代码中,请将其与完整的错误消息一起发布。