How do I add a menu task to /node path? I want to add a custom tab after "Edit" but can't figure out how to do so. I added a mymodule.links.task.yml file

entity.node.import_form:
  route_name: entity.node.import_form
  base_route: entity.node.canonical
  title: Import JSON from file


But I don't understand what to do next. The node form just errors out with:


  Symfony\Component\Routing\Exception\RouteNotFoundException:
  Route &quot;entity.node.import_form&quot; does not exist. in Drupal\Core\Routing\RouteProvider-&gt;getRouteByName()
  (line 128 of /var/www/sites/datacenter.com/docroot/core/lib/Drupal/Core/Routing/RouteProvider.php).
What you have done is to create a menu task on the route entity.node.canonical with the title of Import JSON from file which links to the route entity.node.import_form.

The error you are getting is because the route entity.node.import_form (the link of the task) doesn't exist. You have to either depend/enable the module that provides this route or create the route yourself.