pixijs / webdoc-template

PixiJS template ported to webdoc
https://pixijs.io/docs
4 stars 3 forks source link

UnhandledPromiseRejectionWarning: Error: Cannot find module 'jsdoc/src/filter' #7

Open stepancar opened 3 years ago

stepancar commented 3 years ago

Hello, I'm trying to migrate to webdoc from pixi-jsdoc-template

I my webdoc config I have

"templates": {
    "default": {
          "staticFiles": {
              "include": [
                  "."
              ],
              "exclude": [
                  "./docs",
                  "./node_modules",
                  "./public",
                  "./results",
                  "./scripts",
                  "./test"
              ],
              "includePattern": ".\\.png$"
          }
      },
}

It was working with pixi-jsdoc-template, but with pixi-webdoc-template it fails with stacktrace

(node:26703) UnhandledPromiseRejectionWarning: Error: Cannot find module 'jsdoc/src/filter'
Require stack:
- /project/node_modules/@pixi/webdoc-template/publish.js
- /project/node_modules/@webdoc/cli/lib/index.js
- /project/node_modules/@webdoc/cli/cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)

I tried to debug and don't understand how it works jsdoc doesn't have public src folder

bigtimebuddy commented 3 years ago

Here's the offending bit:

https://github.com/pixijs/webdoc-template/blob/9c21d04a2ff3198e207e7e920f371ee3c75c77b6/publish.js#L638-L662

I should probably remove this from the template because it doesn't work (as you've pointed out). This is likely a feature request and question for webdoc, since I'm not sure if there's a Filter/Scanner like APIs for webdoc. @SukantPal thoughts?