From 9917dda6f4d63f065353fbd6fd20e1e1c84c301d Mon Sep 17 00:00:00 2001 From: Ryan Ling Date: Tue, 2 Apr 2024 13:35:48 +1100 Subject: [PATCH] template/*-rest-api: Fix lint failure (#1514) --- .changeset/gentle-suits-live.md | 15 +++++++++++++++ template/express-rest-api/package.json | 1 + template/koa-rest-api/package.json | 1 + 3 files changed, 17 insertions(+) create mode 100644 .changeset/gentle-suits-live.md diff --git a/.changeset/gentle-suits-live.md b/.changeset/gentle-suits-live.md new file mode 100644 index 000000000..1ff334dd2 --- /dev/null +++ b/.changeset/gentle-suits-live.md @@ -0,0 +1,15 @@ +--- +'skuba': patch +--- + +template/\*-rest-api: Fix lint failure + +This resolves the following failure on a newly-initialised project due to a regression in the `@types/express` dependency chain: + +```console +error TS2688: Cannot find type definition file for 'mime'. + The file is in the program because: + Entry point for implicit type library 'mime' +``` + +A temporary workaround is to install `mime` as a dev dependency. diff --git a/template/express-rest-api/package.json b/template/express-rest-api/package.json index 0c1c5e2c4..aea6578f4 100644 --- a/template/express-rest-api/package.json +++ b/template/express-rest-api/package.json @@ -20,6 +20,7 @@ "@types/express": "^4.17.13", "@types/node": "^20.9.0", "@types/supertest": "^6.0.0", + "mime": "^4.0.1", "pino-pretty": "^11.0.0", "skuba": "*", "supertest": "^6.1.6" diff --git a/template/koa-rest-api/package.json b/template/koa-rest-api/package.json index ae9b700de..452135e9f 100644 --- a/template/koa-rest-api/package.json +++ b/template/koa-rest-api/package.json @@ -39,6 +39,7 @@ "@types/node": "^20.9.0", "@types/supertest": "^6.0.0", "chance": "^1.1.8", + "mime": "^4.0.1", "pino-pretty": "^11.0.0", "skuba": "*", "supertest": "^6.1.6"