I just tried it myself:
Install JSDoc:
npm install -g jsdoc => OK
Create a dummy file, src/x.js:
/**
* Represents a base element
* @extends HTMLElement
* @constructor
*/
function hello () {
console.log ('Hello world!');
}
Run jsdoc src
Check the results (default directory "out/"
):

In other words:
a) You may specify a JS file, but you'll typically specify a JS package directory.
b) By default, JSDoc doesn't recognize ".mjs"
SUGGESTION:
Specify a configuration file, and edit source.includePatter=n
:
https://jsdoc.app/about-configuring-jsdoc.html#specifying-input-files
Specifying input files
The source set of options, in combination with paths given to JSDoc on
the command line, determines the set of input files that JSDoc uses to
generate documentation.
{
"source": {
"include": [ /* array of paths to files to generate documentation for */ ],
"exclude": [ /* array of paths to exclude */ ],
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_"
}
}
- source.include: An optional array of paths that contain files for which JSDoc should generate documentation. The paths given to JSDoc on
the command line are combined with these paths. You can use the -r
command-line option to recurse into subdirectories.
- source.exclude: An optional array of paths that JSDoc should ignore. In JSDoc 3.3.0 and later, this array may include subdirectories of the
paths in source.include.
- source.includePattern: An optional string, interpreted as a regular expression. If present, all filenames must match this regular
expression to be processed by JSDoc. By default, this option is set to
".+.js(doc|x)?$", meaning that only files with the extensions .js,
.jsdoc, and .jsx will be processed.
- source.excludePattern: An optional string, interpreted as a regular expression. If present, any file matching this regular expression
will be ignored. By default, this option is set so that files
beginning with an underscore (or anything under a directory beginning
with an underscore) is ignored.
Good luck - and please post back what you find!