jsdoc2md / jsdoc-to-markdown

Generate markdown documentation from jsdoc-annotated javascript
MIT License
1.68k stars 151 forks source link

Error: The partial main could not be found #300

Closed lijuhong1981 closed 1 month ago

lijuhong1981 commented 1 month ago

I use the "jsdoc2md src/index.js" command, report error: “Error: The partial main could not be found” The jsdoc-to-markdown version is 8.0.2.

lijuhong1981 commented 1 month ago

The version 8.0.1 can be used. But if update to 8.0.2 version, use it report error: “Error: The partial main could not be found”.

75lb commented 1 month ago

I can't reproduce this.. Could you uninstall then reinstall jsdoc2md and try again.. if it still fails, please post a reproduction case here which I can run to see it fail.. I will need to see the full command you use plus a JS file which fails. Also, tell me which node version you are using.

lijuhong1981 commented 1 month ago

Reinstall and try again still fails. The node version is 20.10.0. I created a whole new project still fails. jsdoc2md.zip

KhromovNikita commented 1 month ago

I also get a similar error: Error: The partial main could not be found v8.0.2 Node: v18.17.1

75lb commented 1 month ago

Reinstall and try again still fails. The node version is 20.10.0. I created a whole new project still fails. jsdoc2md.zip

I'm on macOS.. from this project I tried npm run build-docs in node 12, 15, 16, 18 and 22 and everything worked correctly.. which OS are you on?

lijuhong1981 commented 1 month ago

windows 10

75lb commented 1 month ago

Fixed in v8.0.3 - please reinstall and try again.

Fast-glob on windows was the issue. I replaced node-glob with fast-glob recently as node-glob does not support old Node.js versions (jsdoc2md requires support back to v12).. I have rolled back to node-glob for now, while I look more closely at the fast-glob windows issue. Many thanks for the quick bug report!

/cc https://github.com/jsdoc2md/jsdoc-api/pull/28