我正在尝试使用 Stellar 钱包解决此错误

问题描述

然后每次我运行恒星本地主机时,我都会收到错误 stellar-wallet#undefined

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

这是完整的代码

const initializeComponent = async (elm,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,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,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();
  }
};

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...