Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

No documentation was found for object "SomeClass" or any path ending with that. #201

Open
spippoli opened this issue May 27, 2022 · 4 comments

Comments

@spippoli
Copy link

I'm trying to setup sphinx_js but I keep receiving this error:

~/test_sphinx_js$ sphinx-build  -b html docs/source/ docs/build/html/
Running Sphinx v4.4.0
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index                                                                                                                                                                                    
Sphinx error:
No documentation was found for object "SomeClass" or any path ending with that.

this is my test project structure:

.
├── docs
│   ├── build
│   │   └── html
│   ├── make.bat
│   ├── Makefile
│   └── source
│       ├── conf.py
│       ├── index.rst
│       ├── _static
│       └── _templates
└── src
    └── SomeClass.js

and these are the relevant settings and code:

conf.py

[...]
extensions = ['sphinx_js']
js_source_path = '../../src'
primary_domain = 'js'
[...]

index.rst:

Welcome to SomeDocs's documentation!
====================================

.. toctree::
   :maxdepth: 2
   :caption: Contents:



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

.. js:autoclass:: SomeClass

SomeClass.js:



/** Class representing something. */
export default class SomeClass {

    /**
     * Create class.
     * @param {string} name - The name of the object.
     * @param {string} type - The type of object.
     */
    constructor(name, type) {
        this.name = name;
        this.type = type;

    }
}

I must be missing something obvious but I can't wrap my head around it

@alyssadsouza
Copy link

Any progress made on this? I have the same issue for autofunction with the same file structure and conf.py. My project is running typedoc v0.23.26 and typescript v4.9.4.

@spippoli
Copy link
Author

If i remember correctly the problem was caused by

export default class SomeClass {
    [...]
}

autofunction worked after refactoring to

class SomeClass {
    [...]
}

export default SomeClass;

@meatballs
Copy link

I have the same problem using autofunction

refactoring the export makes no difference.

typedoc 0.24.8
typescript 5.1.3

@meatballs
Copy link

If I build my typescript and switch to using jsdoc on the resulting js files, it all works just fine

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants