From aac1b7fae052bb4e1f12e97902fde440d7ee5c12 Mon Sep 17 00:00:00 2001 From: Nick Stokoe Date: Mon, 28 Oct 2024 16:50:13 +0000 Subject: [PATCH] [common] package.json - add dist/ to `npm run clean` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this the compiled contract doesn't get removed which can play havoc with everything else (backend tests crashing as below etc.) ``` ⎯⎯⎯⎯⎯ Uncaught Exception ⎯⎯⎯⎯⎯ TypeError: Cannot read properties of undefined (reading 'method') ❯ registerRoute ../../node_modules/@ts-rest/fastify/index.esm.mjs:140:26 ❯ recursivelyRegisterRouter ../../node_modules/@ts-rest/fastify/index.esm.mjs:214:9 ❯ recursivelyRegisterRouter ../../node_modules/@ts-rest/fastify/index.esm.mjs:209:13 ❯ ../../node_modules/@ts-rest/fastify/index.esm.mjs:97:9 ❯ Plugin.exec ../../node_modules/avvio/lib/plugin.js:125:28 ❯ Boot._loadPlugin ../../node_modules/avvio/boot.js:432:10 ❯ processTicksAndRejections node:internal/process/task_queues:82:21 This error originated in "test/plugin.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. The latest test that might've caused the error is "testing datasetItem". It might mean one of the following: - The error was thrown, while Vitest was running this test. - If the error occurred after the test had been completed, this was the last documented test before it was thrown. ``` --- libs/common/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/common/package.json b/libs/common/package.json index 24a3b04d..6a8dc391 100644 --- a/libs/common/package.json +++ b/libs/common/package.json @@ -9,7 +9,7 @@ "main": "dist/common.js", "types": "./dist/src/index.d.ts", "scripts": { - "clean": "rimraf node_modules", + "clean": "rimraf dist node_modules", "prebuild": "npm run generate-openapi", "build": "vite build", "generate-openapi": "npx vite-node src/api/generate-openapi.ts",