Error while SPFx web-part is Loading in Workbench

When the SPFx web part is run using the gulp serve command, and the web part is loaded in the browser through the Workbench,

An error appears in a dialog box as shown in the image below.

Warning

while refreshing the browser's tab still facing this error and webpart could not be loaded.

This error occurs because the manifest could not be built on the localhost port.

To resolve this issue, open a new browser tab and navigate to the following URL:

https://localhost:4321/temp/manifests.js

The images below also illustrate how the manifest file is built and served on the localhost port.

Localhost

temp

build - temp

After applying the following steps and successfully building the manifest file, refresh the page.

The SPFx web part should then load correctly.