React plugin after removing and adding again not working

When I create react plugin with UDT, everything runs fine. But when I remove plugin from UDT and add it again without any changes (button add plugin and select manifest.json), it shows empty panel and in debug is this error:

uxp://uxp-internal/webfs_scripts.js:2 Uncaught Error: Failed to load script file: index.js
Failed to invoke the stat. File Path: xxxxxxxxxxx/plugin/index.js
at l (uxp://uxp-internal/webfs_scripts.js:2)
at s (uxp://uxp-internal/webfs_scripts.js:2)
at e.exports.readFileSync (uxp://uxp-internal/webfs_scripts.js:2)
at Object.readFileSync (uxp://uxp-internal/webfs_scripts.js:2)
at Object.readFileUrlSync (uxp://uxp-internal/domjs_scripts.js:2)
at e.exports._insertRemoteScript (uxp://uxp-internal/domjs_scripts.js:2)
at e.exports._checkScriptNode (uxp://uxp-internal/domjs_scripts.js:2)
at e.exports.appendChild (uxp://uxp-internal/domjs_scripts.js:2)
at e.exports.appendChild (uxp://uxp-internal/domjs_scripts.js:2)
at e.exports.appendChild (uxp://uxp-internal/domjs_scripts.js:2)

Did you follow the build instructions? Can you share your manifest.json and your maybe a screenshot of your plugin’s expanded file directory?

Yes, I followed build instructions. The problem was, that I was loading manifest.json from “plugin” folder instead of “dist” folder, which is created after build process.
Thank you for your help.

1 Like