Skip to content

[ERROR] mkdocs build fails on missing sdk-typescript folder #382

@azarboon

Description

@azarboon

When I try to run mkdocs serve on my device, it fails with the following error:

mahdi@MahdiLenovo:/mnt/c/Users/mazar/strands/azarboon_strands_repo_doc$ mkdocs serve

> docs@1.0.0 docs:ts
> typedoc --options typedoc.json

error TS18003: No inputs were found in config file '/mnt/c/Users/mazar/strands/azarboon_strands_repo_doc/typedoc-tsconfig.json'. Specified 'include' paths were '["sdk-typescript/src/**/*.ts"]' and 'exclude' paths were '["sdk-typescript/src/**/__**__/**","sdk-typescript/src/**/*.test.ts"]'.

[error] Found 1 errors and 0 warnings
Traceback (most recent call last):
  File "/home/mahdi/.local/bin/mkdocs", line 7, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mahdi/.local/lib/python3.12/site-packages/mkdocs/__main__.py", line 272, in serve_command
    serve.serve(**kwargs)
  File "/home/mahdi/.local/lib/python3.12/site-packages/mkdocs/commands/serve.py", line 55, in serve
    config.plugins.on_startup(command=('build' if is_clean else 'serve'), dirty=is_dirty)     
  File "/home/mahdi/.local/lib/python3.12/site-packages/mkdocs/plugins.py", line 576, in on_startup
    return self.run_event('startup', command=command, dirty=dirty)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mahdi/.local/lib/python3.12/site-packages/mkdocs/plugins.py", line 568, in run_event
    result = method(**kwargs)
             ^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/mazar/strands/azarboon_strands_repo_doc/build-ts-docs.py", line 6, in on_startup
    subprocess.run(['npm', 'run', 'docs:ts'], check=True, cwd=os.getcwd())
  File "/usr/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['npm', 'run', 'docs:ts']' returned non-zero exit status 1.

Root Cause of mkdocs serve Failure

After investigation, I identified the root cause of the failure:

In the mkdocs.yml file, the following hook is defined:

hooks:

  • build-ts-docs.py

This hook attempts to run typedoc.json, which contains an invalid entry point:

"entryPoints": ["sdk-typescript/src/index.ts"]

The repository focuses on documentation, and it is unclear why the invalid sdk-typescript folder was included in the entry points.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions