Comments (8)
The markdown structure for the generated API docs isn't customizable. What would you like to be different?
from jsdoc-md.
i don't know rn, because I keep getting this error:
Error running jsdoc-md:
Error: Unable to get a code location for JSDoc source token `description`.
at getJsdocSourceTokenCodeLocation (file:///home/runner/.npm-global/lib/node_modules/jsdoc-md/private/getJsdocSourceTokenCodeLocation.mjs:96:11)
at jsdocCommentToMember (file:///home/runner/.npm-global/lib/node_modules/jsdoc-md/private/jsdocCommentToMember.mjs:353:33)
at file:///home/runner/.npm-global/lib/node_modules/jsdoc-md/public/jsdocMd.mjs:98:29
at async Promise.all (index 0)
at async jsdocMd (file:///home/runner/.npm-global/lib/node_modules/jsdoc-md/public/jsdocMd.mjs:82:3)
at async jsdocMdCli (file:///home/runner/.npm-global/lib/node_modules/jsdoc-md/cli/jsdoc-md.mjs:54:5)
from jsdoc-md.
It seems it's unable to parse the description part of a JSDoc comment correctly. Are you able to share minimal reproduction steps for the issue? Just the contents of a .js
file that contains a single JSDoc comment that causes the error, with as much irrelevant details removed as possible.
from jsdoc-md.
Now, I'm getting this error when I only read this file (Minimalsed Ver. Below)
TypeError: Argument 1 'markdown' must be a populated string.
/**
* Check if the xml_Tag is the parse-able/parsed XML Tag
*
* @param {*} xml_Tag - The object to check
* @returns {Boolean}
*/
function isXMLTag(xml_Tag) {
...
}
/**
* check if the item is the Item type
*
* @param {*} item - The object to check
* @returns {Boolean}
*/
const isItem = item => (isXMLTag(item) && item.$.referent) || !item.isParsed
/**
* converts a referent id, item, or
*
* @param {String|Item|Instance} instance - the instance you want to convert
* @returns {Instance}
*/
function convertValidInstance(instance) {
...
}
/**
* @param {Array<Item>} itemList - A list of Item objects
* @param {String} className - The name of the className
* @param {String|Item|Instance} parent - The item's parent
* @returns {null | Item}
* @description Finds the first instance in 'itemList' with the same class as 'className'
*/
function findFirstItemByClassName(itemList, className, parent) {
...
}
/**
* @param {Item} item - The Item you want convert
* @param {String|Item|Instance} parent - The item's parent
* @param {Object} options - extra options
*
* @return {Instance | Item}
*/
function convertItemToInstance(item, parent, options) {
...
}
...
Full err:
Error running jsdoc-md:
TypeError: Argument 1 `markdown` must be a populated string.
at replaceMdSection (file:///home/runner/.npm-global/lib/node_modules/jsdoc-md/private/replaceMdSection.mjs:27:11)
at jsdocMd (file:///home/runner/.npm-global/lib/node_modules/jsdoc-md/public/jsdocMd.mjs:111:19)
at async jsdocMdCli (file:///home/runner/.npm-global/lib/node_modules/jsdoc-md/cli/jsdoc-md.mjs:54:5)
what i put in shell
jsdoc-md -s index.js
P.S: I'm not TENICLLY, installing it globally because it give me Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
error, so i followed this tutorial and just copied and pasted this:
npm config set prefix '~/.npm-global'
touch ~/.profile
export PATH=~/.npm-global/bin:$PATH
source ~/.profile
into my cmd line in repl.it project
from jsdoc-md.
I tried the code you shared on my computer, first using jsdoc-md
dependencies as they were installed the last time I was working on it and again with a fresh node_modules
installation (just in case an update to a dependency might be causing new users problems with fresh installs) and both worked fine.
I think there is something strange about the system you're on, and the problem is not likely to be the contents of your project code.
What would be interesting is if you were to clone this jsdoc-md
project into a similar environment to the the project you're having problems with, then do an npm install
within the jsdoc-md
project and run npm run test:api
to see exactly what parts of the API are not functioning as expected in that environment.
from jsdoc-md.
I cant do that because I use repl.it an online code editor
from jsdoc-md.
Double check the version of Node.js you're using matches what is supported:
Line 43 in 7df4bd2
Note that Node.js v17 is pretty new and jsdoc-md
isn't tested yet with it in CI, so it might be a bit risky to use. I just ran the tests locally with Node.js v17.0.1 though and everything was fine.
Also, make sure npm is up to date.
Other than these suggestions, I'm not able to help you much further. The burden should be on repl.it to support packages that have been proven to work ok in a regular Node.js environment. Our GitHub Actions CI tests the full API and CLI with 100% code coverage, against supported Node.js versions on both Linux and macOS:
jsdoc-md/.github/workflows/ci.yml
Lines 9 to 10 in 7df4bd2
Feel free to investigate further if you like and consider reporting the problems you're experiencing to repl.it. If there is anything specific that can be improved about jsdoc-md
let us know either here or via a PR :)
from jsdoc-md.
@jaydenseric,
repl.it's node version is v12.22.6
and npm's is also 6.14.15
I really don't know why this is helping or if it is only a repl.it problem, or even if it's my code!!!
i my have to contact the reply,it team about this
P.S: If you tried my code by just git cloning to or copying the main branch... that won't work, all my new code is in rep.lt and in the unable branch, as you can see here:
from jsdoc-md.
Related Issues (17)
- how do we show type for namespace? HOT 2
- We should extend the MDN link types. HOT 1
- Make auto MDN linking ES global types case-sensitive HOT 5
- Missing target heading “API”. HOT 2
- Display source code file path and location in inline @link tag namepath related error messages
- Code location in inline @link tag namepath error messages doesn't account for JSDoc comment fence
- Generate “Fired by” content for events
- CLI to check if the markdown file is up to date HOT 1
- Publish the private JSDoc analysis API HOT 3
- Getting ERR_PACKAGE_PATH_NOT_EXPORTED HOT 4
- Code gets read but is not generated at all... HOT 1
- Support JSDoc inline links HOT 2
- Fix broken successive member links
- @returns documentation not generated
- Sort members in the documentation outline HOT 1
- We should support Uint8Array? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsdoc-md.