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

Error serving up sp-webpart sample #21

Open
1 of 9 tasks
JonoSuave opened this issue Jul 31, 2024 · 2 comments
Open
1 of 9 tasks

Error serving up sp-webpart sample #21

JonoSuave opened this issue Jul 31, 2024 · 2 comments

Comments

@JonoSuave
Copy link

Sample

https://github.com/pnp/mgt-samples/tree/main/samples/app/sp-webpart

Author(s)

Gavin Barron

What happened?

When I run a gulp serve --nobrowser I get the following error:

Error - [webpack] 'dist':
./node_modules/lit-element/lit-element.js 6:194
Module parse failed: Unexpected token (6:194)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|  * Copyright 2017 Google LLC
|  * SPDX-License-Identifier: BSD-3-Clause
>  */class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i}}s._$litElement$=!0,s[("finalized","finalized")]=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const r=globalThis.litElementPolyfillSupport;r?.({LitElement:s});const o={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(globalThis.litElementVersions??=[]).push("4.0.4");export{s as LitElement,o as _$LE};
| //# sourceMappingURL=lit-element.js.map
| 
 @ ./node_modules/lit/index.js 3:0-43 3:0-43
 @ ./node_modules/@microsoft/mgt-element/dist/es6/components/baseComponent.js
 @ ./node_modules/@microsoft/mgt-element/dist/es6/index.js
 @ ./lib/webparts/mgtDemo/MgtDemoWebPart.js

Steps to reproduce

  1. npm install the sp-webpart sample. I'm using node version 18.18.2.
  2. Run gulp serve --nobrowser

Expected behavior

To not have any errors and to see the MGT sample display in workbench

Developer environment

macOS

Browsers

  • Internet Explorer
  • Microsoft Edge
  • Google Chrome
  • FireFox
  • Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

No response

@sebastienlevert
Copy link
Collaborator

I was able to reproduce on my environment. @musale or @Mnickii can you have a look at this? Were there changes made on how the SPFx experience should work?

@musale
Copy link

musale commented Aug 26, 2024

I'll look into this during the week @sebastienlevert @JonoSuave

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

3 participants