I am getting an error after gulp serve (SharePoint Framework using nodejs):
[SPLoaderError.loadComponentError]:
***Failed to load component "61b23e18-26fb-42bb-ad9f-29bfcbcebab4" (BryntumGanttWebPart). Original error: ***Failed to load URL 'https://localhost:4321/node_modules/react/dist/react.js' for resource 'react' in component '61b23e18-26fb-42bb-ad9f-29bfcbcebab4' (BryntumGanttWebPart). The file was not found in the server. Make sure that you are running 'gulp serve'.
***INNERERROR:
***Failed to load URL 'https://localhost:4321/node_modules/react/dist/react.js' for resource 'react' in component '61b23e18-26fb-42bb-ad9f-29bfcbcebab4' (BryntumGanttWebPart). The file was not found in the server. Make sure that you are running 'gulp serve'.
***CALLSTACK:
Error
at SPLoaderError.SPError [as constructor] (https://localhost:4321/temp/workbench-packages/@microsoft_sp-webpart-workbench/local-workbench/sp-webpart-workbench-assembly_default.js:24443:24)
at new SPLoaderError (https://localhost:4321/temp/workbench-packages/@microsoft_sp-webpart-workbench/local-workbench/sp-webpart-workbench-assembly_default.js:42161:28)
at Function../sp-loader.js.__WEBPACK_AMD_DEFINE_RESULT__.ff4n.ErrorBuilder.buildErrorWithVerboseLog (https://localhost:4321/temp/workbench-packages/@microsoft_sp-webpart-workbench/local-workbench/sp-webpart-workbench-assembly_default.js:46155:21)
at Function../sp-loader.js.__WEBPACK_AMD_DEFINE_RESULT__.ff4n.ErrorBuilder.buildLoadComponentError (https://localhost:4321/temp/workbench-packages/@microsoft_sp-webpart-workbench/local-workbench/sp-webpart-workbench-assembly_default.js:46024:21)
at https://localhost:4321/temp/workbench-packages/@microsoft_sp-webpart-workbench/local-workbench/sp-webpart-workbench-assembly_default.js:45362:75
You can replace the content of package.json with the json below. Some deps in the package.json had been wrongly updated in the release bundle. This change will be reverted. Sorry for the inconvenience.
{
"name": "bryntum-fabric-sp-fx",
"version": "0.0.1",
"private": true,
"main": "lib/index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"builder": "node ../../../_shared/scripts/build.js",
"build": "gulp bundle",
"clean": "gulp clean",
"test": "gulp test",
"preinstall": "npm run builder",
"postinstall": "postinstall"
},
"postinstall": {
"node_modules/bryntum-gantt/gantt.d.ts": "link node_modules/bryntum-gantt/gantt.module.d.ts",
"node_modules/bryntum-gantt/gantt.stockholm.css": "copy src/webparts/bryntumGantt/resources/gantt.stockholm.scss",
"node_modules/bryntum-gantt/fonts": "copy src/webparts/bryntumGantt/resources/fonts",
"../../../_datasets/launch-saas.json": "copy src/webparts/bryntumGantt/resources/data/launch-saas.json",
"node_modules/bryntum-react-shared/resources/images": "copy src/webparts/bryntumGantt/resources/images",
"node_modules/bryntum-react-shared/src/BryntumGantt.js": "copy src/webparts/bryntumGantt/shared/BryntumGantt.js",
"node_modules/bryntum-react-shared/src/BryntumWidget.js": "copy src/webparts/bryntumGantt/shared/BryntumWidget.js"
},
"dependencies": {
"@microsoft/sp-core-library": "1.10.0",
"@microsoft/sp-lodash-subset": "1.10.0",
"@microsoft/sp-office-ui-fabric-core": "1.10.0",
"@microsoft/sp-property-pane": "1.10.0",
"@microsoft/sp-webpart-base": "1.10.0",
"@pnp/sp": "^2.0.3",
"@pnp/spfx-property-controls": "1.17.0",
"@types/es6-promise": "0.0.33",
"@types/react": "16.8.8",
"@types/react-dom": "16.8.3",
"@types/webpack-env": "1.13.1",
"bryntum-gantt": "file:../../../../build",
"bryntum-react-shared": "file:../../_shared/build",
"office-ui-fabric-react": "6.189.2",
"react": "16.8.5",
"react-dom": "16.8.5"
},
"resolutions": {
"@types/react": "16.8.8"
},
"devDependencies": {
"@microsoft/rush-stack-compiler-3.3": "0.3.5",
"@microsoft/sp-build-web": "1.10.0",
"@microsoft/sp-module-interfaces": "1.10.0",
"@microsoft/sp-tslint-rules": "1.10.0",
"@microsoft/sp-webpart-workbench": "1.10.0",
"@types/chai": "3.4.34",
"@types/mocha": "2.2.38",
"ajv": "~5.2.2",
"gulp": "~3.9.1",
"postinstall": "~0.4.2",
"string-replace-loader": "^2.3.0"
}
}