Skip to content

Compilation Error - SPFX WebPart #9

@neeraj-sharma2007

Description

@neeraj-sharma2007
Image

Hi Team,
I want to use SPFX webpart only which is available under apps/SPFX folder, but I am experiencing the issue below while running the command in visual studio code.

Command:
npx lerna run serve --scope=@pnp/modern-search-core-spfx

Error:
Error - [webpack] 'dist':
./node_modules/@pnp/modern-search-core/dist/es6/services/templateService/TemplateService.js 106:17
Module parse failed: Unexpected token (106:17)
File was processed with these loaders:

  • ./node_modules/source-map-loader/dist/cjs.js
    You may need an additional loader to handle the result of these loaders.
    | }
    | processResultTypesFromHtml(data, templateContent) {

Environment:
Node version : 16.20.1
NPM version: 8.19.4
Referring the below link to run and debug the SPFX webpart.
https://microsoft-search.github.io/pnp-modern-search-core-components/docs/development-guide/components/getting_started#spfx-web-parts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions