Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module error for lit-html@3.0.0/lit-html.js #51

Open
saurabh69912162 opened this issue Oct 10, 2023 · 6 comments
Open

Module error for lit-html@3.0.0/lit-html.js #51

saurabh69912162 opened this issue Oct 10, 2023 · 6 comments

Comments

@saurabh69912162
Copy link

image

lit-html@3.0.0/lit-html.js - This file is responding with error 500, resulting in the non-functioning of Ninja Keys in HTML.

Ninja-keys HTML Sandbox is also not working.

@blairanderson
Copy link

I am getting the same: https://unpkg.com/lit-html@3.0.0/async-directive.js?module

Cannot generate module for lit-html@3.0.0/async-directive.js

SyntaxError: unknown: Support for the experimental syntax 'logicalAssignment' isn't currently enabled (6:616):

  4 |  * Copyright 2017 Google LLC
  5 |  * SPDX-License-Identifier: BSD-3-Clause
> 6 |  */const s=(i,t)=>{const e=i._$AN;if(void 0===e)return!1;for(const i of e)i._$AO?.(t,!1),s(i,t);return!0},o=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t}while(0===e?.size)},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),c(t)}};function h(i){void 0!==this._$AN?(o(this),this._$AM=i,r(this)):this._$AM=i}function n(i,t=!1,e=0){const r=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(t)if(Array.isArray(r))for(let i=e;i<r.length;i++)s(r[i],!1),o(r[i]);else null!=r&&(s(r,!1),o(r));else s(this,i)}const c=i=>{i.type==e.CHILD&&(i._$AP??=n,i._$AQ??=h)};class f extends t{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(s(this,i),o(this))}setValue(t){if(i(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}export{f as AsyncDirective};
    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ^
  7 | 
  8 | 

Add @babel/plugin-proposal-logical-assignment-operators (https://git.io/vAlRe) to the 'plugins' section of your Babel config to enable transformation.

undefined

@blairanderson
Copy link

@saurabh69912162 ninja-keys has not been updated since July 2022.

Somehow its using a lit component with latest version of lit-html and that latest version is broken.

Lit is probably going to fix itself.

@ls-jf-gagnon
Copy link

As a workaround, for now, you can add an import map to overwrite the path of the lit-html lib

<script type="importmap">
    {
        "imports": {
            "https://unpkg.com/lit-html@latest/directives/ref.js?module": "https://unpkg.com/lit-html@2.2.6/directives/ref.js?module"
        }
    }
</script>

@saurabh69912162
Copy link
Author

@ls-jf-gagnon - Thanks! it worked

As a workaround, for now, you can add an import map to overwrite the path of the lit-html lib

<script type="importmap">
    {
        "imports": {
            "https://unpkg.com/lit-html@latest/directives/ref.js?module": "https://unpkg.com/lit-html@2.2.6/directives/ref.js?module"
        }
    }
</script>

@legend80s
Copy link

You man are awesome!

@tiagorangel2011
Copy link

tiagorangel2011 commented Nov 4, 2023

As a workaround, for now, you can add an import map to overwrite the path of the lit-html lib

<script type="importmap">
    {
        "imports": {
            "https://unpkg.com/lit-html@latest/directives/ref.js?module": "https://unpkg.com/lit-html@2.2.6/directives/ref.js?module"
        }
    }
</script>

Thank you so much, it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants