Step 6 - gunjandatta/spfx-forms Wiki

Previous Step

Build Solutions

This section will go over the building and packaging of the SPFx webpart. I will skip the basic npm run build and gulp serve commands and go straight to packaging the solution since this is where stuff goes wrong. Due to the new ESLint rules applied in SPFx v1.15, you will notice that packaging the solution will fail.

Run npm run package to create the SPFx solution package file.

Build Errors

Update ESLint Configuration (.eslintrc.js)

To bypass these errors, you will need update the ESLint configuration file included in the root of the project. From the warnings displayed, you can turn the rules off.

module.exports = {
  extends: ['@microsoft/eslint-config-spfx/lib/profiles/default'],
  parserOptions: { tsconfigRootDir: __dirname },
  rules: {
    "@typescript-eslint/no-unused-vars": "off",
    "@typescript-eslint/no-explicit-any": "off"

Package Solution

After making the ESLint updates, run the npm run package command and it will generate the .sppkg SPFx solution package file under the sharepoint/solution folder.

Next Step