Skip to content

Searching for lib files in root directory #464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Bibliofile opened this issue Mar 30, 2017 · 3 comments
Closed

Searching for lib files in root directory #464

Bibliofile opened this issue Mar 30, 2017 · 3 comments

Comments

@Bibliofile
Copy link

I am running the latest (0.5.9) version of typedoc. Node version 7.8.0

Output:

> typedoc --out docs --mode modules src

Using TypeScript 2.2.1 from C:\...\node_modules\typescript\lib
Error: File 'C:/lib.dom.d.ts' not found.
Error: File 'C:/lib.es2016.d.ts' not found.

My tsconfig.json file is the following:

{
    "compilerOptions": {
        "target": "es6",
        "moduleResolution": "node",
        "module": "commonjs",
        "lib": ["es2016", "dom"],
        "noImplicitAny": true,
        "removeComments": false,
        "strictNullChecks": true
    }
}

Please let me know if any further information is needed, for now I've just swapped arr.includes for !!~arr.indexOf, though I'd much rather use the readable alternative.

@aciccarello
Copy link
Collaborator

Thanks for the detailed report.

@nicknisi Since you implemented #449, do you have any idea why the lib option would look in the root directory?

@nicknisi
Copy link
Collaborator

@aciccarello That should be passing through to Node to look for them in the proper location. I'll dig into this further and see if I can reproduce it.

@nicknisi
Copy link
Collaborator

nicknisi commented Apr 1, 2017

I setup a quick test project on macOS with the same tsconfig.json and ran typedoc with the same args and got no errors. I setup the same thing on Windows and could reproduce, so it initially seems to be Windows-specific.

@nicknisi nicknisi added the bug label Apr 1, 2017
nicknisi added a commit to nicknisi/typedoc that referenced this issue Apr 2, 2017
Remove use of Path.join in the getDefaultLibFileName method that, on Windows, converts '/' in paths to '\'. TypeScript
uses '/' internally so it has trouble locating the default lib location when this is reversed. Fixes TypeStrong#464 where lib
directory cannot be found on Windows.
nicknisi added a commit to nicknisi/typedoc that referenced this issue Apr 2, 2017
Remove use of Path.join in the getDefaultLibFileName method that, on Windows, converts '/' in paths to '\'. TypeScript
uses '/' internally so it has trouble locating the default lib location when this is reversed. Fixes TypeStrong#464 where lib
directory cannot be found on Windows.
@Gerrit0 Gerrit0 removed the bug label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants