Looks like you made some error specifying the location in the User custom action while registering it.
Go to your sharepoint > assets > elements.xml
file and change the location to ClientSideExtension.ListViewCommandSet.ContextMenu
.
The xml should be something like:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Title="CustomEcb"
RegistrationId="101"
RegistrationType="List"
Location="ClientSideExtension.ListViewCommandSet.ContextMenu"
ClientSideComponentId="6c5b8ee9-43ba-4cdf-a106-04857c8307be"
ClientSideComponentProperties="{"targetUrl":"ShowDetails.aspx"}">
</CustomAction>
</Elements>
Reference - Migrate from ECB to SPFx extensions
The possible values for location are as below:
- ClientSideExtension.ListViewCommandSet.ContextMenu: The context menu of the list item / file in doc lib.
- ClientSideExtension.ListViewCommandSet.CommandBar: The top command set menu in a list or library.
- ClientSideExtension.ListViewCommandSet: Both the context menu and the command bar.
Once you have made the necessary changes, package the solution again and then register the custom action with correct location, it should show up in the context menu