Question

I have just created one SPFx web part with react framework. I tried testing through SharePoint online workbench (https://demo.sharepoint.com/sites/test/_layouts/15/workbench.aspx).

I am getting an error. Chrome browser developer tool shows below error:

Failed to load resource: the server responded with a status of 404 (Not Found)
https://localhost:4321/node_modules/react-dom/dist/react-dom.js
https://localhost:4321/node_modules/react/dist/react.js

Based on above mentioned error, I noticed the "node_modules/react/" does not contains "dist" folder at all.

Was it helpful?

Solution

Per my test, I could reproduce this issue on my end. It seems to be a bug that on SharePoint online workbench it tries to request node_modules/react-dom/dist/react-dom.js instead of the react library

enter image description here

OTHER TIPS

This file type unsupported by office version

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top