TypeStrong / typedoc

Documentation generator for TypeScript projects.
https://typedoc.org
Apache License 2.0
7.64k stars 690 forks source link

"Unable to find any entry points" with typedoc@0.22.4 #1719

Closed TitaneBoy closed 2 years ago

TitaneBoy commented 2 years ago

Search terms

"Unable to find any entry points" "Unable to locate entry point"

Expected Behavior

Should not generate any error and should generate docs

Actual Behavior

Since using typedoc@0.22.4, I'm having trouble to generate typescript documentation with typedoc. Previous version I've used (v.21.9) works fine and without any issues

Here is the typedoc.json file I'm using with typefoc, located at the root folder of my project

{
  "entryPoints": ["src"],
  "out": "docs/Web Server/",
  "readme": "README.md",
  "name": "Web Server Documentation",
  "tsconfig": "./tsconfig.json"
}

The tsconfig.json file is also located at the root of the project..

Calling typedoc with typedoc v0.21.9 works perfectly. But with the last one (v0.22.4), I can see the following

image

Steps to reproduce the bug

Here my tsconfig.json file: tsconfig.json

{
    "extends": "./tsconfigprod.json",
    "compileOnSave": true,
    "compilerOptions": {
        "sourceMap": true
    }
}

Here's the tsconfigprod.json file tsconfigprod.json

{
    "compilerOptions": {
        "noImplicitAny": true,
        "outDir": "./build",
        "target": "es2018",
        "alwaysStrict":true,
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "noFallthroughCasesInSwitch":true,
        "noUnusedLocals":true,
        "noUnusedParameters":true,
        "pretty": true,
        "skipLibCheck": true,
        "esModuleInterop": true,
        "moduleResolution": "node",
        "module": "commonjs",
        "resolveJsonModule": true,
        "downlevelIteration": true
    },
    "include": [
        "./src/**/*"
    ]
    ,
    "exclude": [
        "./build",
        "node_modules"
    ]
}

In the package.json, I have the following script defined:

"docgen": "typedoc",

I'm running the script using the following command: "yarn docgen"

Environment

Gerrit0 commented 2 years ago

Changed the default entryPointStrategy from expand to resolve.

From the 0.22.0 release notes

TitaneBoy commented 2 years ago

From the 0.22.0 release notes

Oh..Wow...Sorry about that...Completely missed that part...Seems to work again..Thank you for your help

pldilley commented 1 year ago

@Gerrit0 It looks like the example given at https://github.com/TypeStrong/typedoc suggests people do typedoc src/index.ts but with this change that will likely fail for most people, and the error does not make it clear what's wrong.

I want to suggest updating the readme to remove "/index.ts"?