danger / peril

☢️ Serious and immediate danger.
https://danger.systems
MIT License
460 stars 58 forks source link

Peril tsc errors during deploy #457

Closed roopakv closed 5 years ago

roopakv commented 5 years ago

When i try and run on heroku as described in running your own instance of peril I see the following error during the build step.

source/api/auth/getJWTFromRequest.ts:1:23 - error TS7016: Could not find a declaration file for module 'cookie'. '/tmp/build_146b789144cecbdcdae0c653ebbc00f8/node_modules/cookie/index.js' implicitly has an 'any' type.
         Try `npm install @types/cookie` if it exists or add a new declaration (.d.ts) file containing `declare module 'cookie';`

       1 import { parse } from "cookie"
                               ~~~~~~~~

       source/api/fetch.ts:1:29 - error TS7016: Could not find a declaration file for module 'async-retry'. '/tmp/build_146b789144cecbdcdae0c653ebbc00f8/node_modules/async-retry/lib/index.js' implicitly has an 'any' type.
         Try `npm install @types/async-retry` if it exists or add a new declaration (.d.ts) file containing `declare module 'async-retry';`

       1 import * as AsyncRetry from "async-retry"
                                     ~~~~~~~~~~~~~

       source/api/fetch.ts:16:12 - error TS7006: Parameter '_' implicitly has an 'any' type.

       16     async (_, attempt) => {
                     ~

       source/api/fetch.ts:16:15 - error TS7006: Parameter 'attempt' implicitly has an 'any' type.

       16     async (_, attempt) => {
                        ~~~~~~~

       source/api/fetch.ts:29:17 - error TS7006: Parameter 'error' implicitly has an 'any' type.

       29       onRetry: (error) => {
                          ~~~~~

       source/github/events/handlers/_tests/_events-create-fixture.test.ts:1:24 - error TS2307: Cannot find module 'prettier'.

       1 import { format } from "prettier"
                                ~~~~~~~~~~

       source/github/events/handlers/_tests/_pr-create-fixture.test.ts:1:24 - error TS2307: Cannot find module 'prettier'.

       1 import { format } from "prettier"
                                ~~~~~~~~~~

       source/runner/customGitHubRequire.ts:1:36 - error TS7016: Could not find a declaration file for module 'require-from-string'. '/tmp/build_146b789144cecbdcdae0c653ebbc00f8/node_modules/require-from-string/index.js' implicitly has an 'any' type.
         Try `npm install @types/require-from-string` if it exists or add a new declaration (.d.ts) file containing `declare module 'require-from-string';`

       1 import * as requireFromString from "require-from-string"
                                            ~~~~~~~~~~~~~~~~~~~~~

       source/scripts/generate-runner-deps.ts:46:22 - error TS7006: Parameter 'moduleFile' implicitly has an 'any' type.

       46 perilModules.forEach(moduleFile => {
                               ~~~~~~~~~~

       Found 9 errors.