microsoft / dtslint

A utility built on TSLint for linting TypeScript declaration (.d.ts) files.
MIT License
925 stars 86 forks source link

Adds a message telling you to npm install when there's missing deps #319

Closed orta closed 3 years ago

orta commented 3 years ago

Should make the next step very obvious if you hit https://github.com/DefinitelyTyped/DefinitelyTyped/issues/24788

orta commented 3 years ago

Looks like:

/Users/ortatherox/dev/typescript/DefinitelyTyped/types/gatsby-plugin-breakpoints
Error: A module look-up failed, the most common case for this error a dependencies which needs to be `npm installed`.

Before you debug, first try running: 
   npm install --prefix types/react

Then re-run. Full error logs are below.

Errors in typescript@4.3 for external dependencies:
../react/index.d.ts(38,22): error TS2307: Cannot find module 'csstype' or its corresponding type declarations.

    at /Users/ortatherox/dev/typescript/dtslint/bin/index.js:207:19
    at Generator.next (<anonymous>)
    at fulfilled (/Users/ortatherox/dev/typescript/dtslint/bin/index.js:6:58)
orta commented 3 years ago

Gonna drop travis in an upcoming PR, GH Actions shows green.