sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

[SPWebPartErrorCode.IncorrectBoostrapModule]: Bootstrap module for web part not of the correct type

Open arnieraju opened this issue 7 years ago • 5 comments

Category

  • [ ] Question
  • [ ] Typo
  • [X] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

When deploying a number of custom SPFx web parts to a classic site, publishing page I am expecting them all to render correctly without errors.

These web parts are in use on a number of other tenancies and have been operating without incident over the last 3 months.

Observed Behavior

When deployed to this particular tenancy 1 out of the 3 web parts consistently errors, the other 2 will render correctly. The web part that throw error changes - sometimes the first , sometimes the second, sometimes the third. The error that is rendered on screen and in the developer console is:

[SPWebPartErrorCode.IncorrectBoostrapModule]: Bootstrap module for web part ... not of the correct type. Make sure to export your web part as 'export default WebPartName'.

Source URL from the developer console is: https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-01-25.012/sp-classic-page-assembly_en-au_6fd7d182cc4605749fbcd41547af8994.js

After a successful deploying to a staging tenancy, this initial deployment to a live environment, and at this stage I am unable remove any previously deployed customisations. As this is only happening in the 1 tenancy, which has existing customisations, my guess is that it is environmental.

Before I rebuild, repackage and redeploy the web parts, do you have any pointers on common causes for this issue and where I can start looking?

1 .The web parts have all been developed in SPFx 1.6.0. 2. The package json is as follows

{ "name": "homepage-tiles", "version": "0.0.1", "private": true, "engines": { "node": ">=0.10.0" }, "scripts": { "build": "gulp bundle", "clean": "gulp clean", "test": "gulp test", "package": "gulp bundle --ship; gulp package-solution --ship;", }, "dependencies": { "@microsoft/sp-core-library": "1.6.0", "@microsoft/sp-lodash-subset": "1.6.0", "@microsoft/sp-office-ui-fabric-core": "1.6.0", "@microsoft/sp-webpart-base": "1.6.0", "@types/es6-promise": "0.0.33", "@types/handlebars": "^4.0.39", "@types/webpack-env": "1.13.1", "google-fonts": "^1.0.0", "handlebars": "^4.0.12", "handlebars-template-loader": "^1.0.0" }, "devDependencies": { "@microsoft/sp-build-web": "1.6.0", "@microsoft/sp-module-interfaces": "1.6.0", "@microsoft/sp-webpart-workbench": "1.6.0", "tslint-microsoft-contrib": "~5.0.0", "gulp": "~3.9.1", "@types/chai": "3.4.34", "@types/mocha": "2.2.38", "ajv": "~5.2.2" } }

Steps to Reproduce

  1. Deploy custom web parts to app catalog
  2. Create new publishing page with custom page layout
  3. Add web parts to page.
  4. Web parts start to incorrectly render.

Thanks in advance!

arnieraju avatar Feb 07 '19 12:02 arnieraju

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Feb 07 '19 12:02 msft-github-bot

image

image

arnieraju avatar Feb 07 '19 12:02 arnieraju

Quick update. After continuing investigations I believe I have tracked it down to a custom master page that has been used on the site. Grrrr.

I am doing some further testing and will report back.

arnieraju avatar Feb 08 '19 08:02 arnieraju

Closing issue as this appears to be due to a custom master page.

arnieraju avatar Feb 18 '19 11:02 arnieraju

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 25 '20 06:01 msft-github-bot