Skip to content

Commit

Permalink
[common] package.json - add dist/ to npm run clean
Browse files Browse the repository at this point in the history
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.
```
  • Loading branch information
Nick Stokoe committed Oct 28, 2024
1 parent 2120e39 commit aac1b7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit aac1b7f

Please sign in to comment.