google / typedoc-neo-theme

Apache License 2.0
85 stars 22 forks source link

Can't get typedoc-neo-theme to work #74

Closed bflemi3 closed 3 years ago

bflemi3 commented 3 years ago

I'm not understanding how to run typedoc with your plugin. Your documentation says build the theme yarn build:theme and build the plugin yarn build:plugin then run typedoc with the plugin

typedoc --theme ../../node_modules/typedoc-neo-theme/bin/default

yarn build:theme doesn't work, yarn doesn't recognize that as a script. So I navigate to ./node_modules/typedoc-neo-theme and run yarn build:theme, but get errors that grunt doesn't exist in ./node_modules/.bin/grunt.

So I yarn in node_modules/typedoc-neo-theme which feels like I'm doing something wrong. Then run yarn build:theme again and get a ton of cannot find module errors, probably because I'm running the script from within your plugin, not my directory. Here's the first error I'm seeing, for example

../@types/aws-lambda/index.d.ts(66,15): error TS2307: Cannot find module './trigger/cognito-user-pool-trigger/' or its corresponding type declarations.


If I try to just run typedoc (from my project root) with your plugin via

./node_modules/.bin/typedoc --theme ../../node_modules/typedoc-neo-theme/bin/default

I get the following error

Error: The plugin /Users/brandonfleming/dev/bubbles/node_modules/typedoc-neo-theme could not be loaded. Info: Error: Cannot find module './bin/default/plugin'

So what am I doing wrong?

Fleker commented 3 years ago

The README might have some additional details for those who are cloning the source code rather than installing it. The NPM installation should have everything pre-built.

For using it in another project, such as a few libraries including actions-on-google-nodejs, the setup is a bit less work:

  1. Provide the library as a devDependency
  2. Use the theme parameter in the typedoc command
"scripts": {
    "docs": "typedoc --options typedoc.json --theme node_modules/typedoc-neo-theme/bin/default src/"
}
  1. Run yarn docs or npm run docs to generate docs with this theme.
bflemi3 commented 3 years ago

Thanks for the quick response @Fleker. I"m still getting the following exception

The theme ./node_modules/typedoc-neo-theme/bin/default could not be found.

Don't I need to build the theme first? If so, that takes me back to my first problem where yarn build:theme and yarn build:plugin don't work.

I should also mention that I'm running typedoc from a package within a mono-repo, so most of the dependencies are installed at the root of the project. I'll try installing and running all of this from the root...

bflemi3 commented 3 years ago

Still having the same issues from the root, can't build the theme.

../@types/aws-lambda/index.d.ts(66,15): error TS2307: Cannot find module './trigger/cognito-user-pool-trigger/' or its corresponding type declarations.

Fleker commented 3 years ago

Are you installing the package via NPM or are you cloning the repo?

k88manish commented 3 years ago

Is this package not available on yarn?

bflemi3 commented 3 years ago

I installed via Yarn.

I've moved back to just using typedoc out of the box. I'll close this issue.

jessegeens commented 2 years ago

I have the same issue:

Any updates on what could be causing this?