mozilla / sphinx-js

Autodoc-style extraction into Sphinx for your JS project
https://pypi.python.org/pypi/sphinx-js/
MIT License
282 stars 81 forks source link

make html returns error #192

Closed davesargrad closed 2 years ago

davesargrad commented 2 years ago

I am trying to use sphinx-js. I've installed it with conda.

conda install -c conda-forge sphinx
conda install -c conda-forge sphinx-js

I've also installed jsdoc using npm install jsdoc -g

I run inside an empty "docs" subfolder of my project.

sphinx-quickstart
sphinx-apidoc -o . ..

The parent directory has valid "js" files.

I see the following error on "make html":

(docs) [dsargrad@sdbie-sargrad docs]$ make html
Running Sphinx v4.5.0
/home/dsargrad/.conda/envs/docs/lib/node_modules/jsdoc/node_modules/mkdirp/lib/opts-arg.js:7
    opts = { mode: 0o777, fs, ...opts }
                              ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at Object.load (/home/dsargrad/.conda/envs/docs/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:105:18)
    at Requizzle.requizzle (/home/dsargrad/.conda/envs/docs/lib/node_modules/jsdoc/node_modules/requizzle/lib/requizzle.js:87:31)
    at infectProxy (/home/dsargrad/.conda/envs/docs/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:79:31)
    at Module.targetModule.require.filepath [as require] (/home/dsargrad/.conda/envs/docs/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:97:44)
    at require (internal/module.js:20:19)

Sphinx error:
jsdoc found no JS files in the directories ['/home/dsargrad/dev/ves']. Make sure js_source_path is set correctly in conf.py. It is also possible (though unlikely) that jsdoc emitted invalid JSON.
make: *** [html] Error 2

image

image

I'm using sphinx 4.5.0, and sphinx-js 3.1.2 image

image

image

I am using jsdoc 3.6.10 image

davesargrad commented 2 years ago

I closed this issue. The problem was in the way that I installed jsdoc.