aws-samples / aws-samples/aws-dynamodb-examples
[Workshop] - Modernizer - Backend errors/warnings on build
- Dominant language
- TypeScript
- Stars
- 602
- Forks
- 242
- Avg merge
- 14m
- Merged PRs (30d)
- 2
Description
When you build the backend for the first time there are 18 errors in 6 files. The project runs without problems but the errors cause confusion to some of the workshop participants.
/backend$ npm run build
```
Found 18 errors in 6 files.
Errors Files
2 src/controllers/AdminController.ts:321
1 src/middleware/seller.ts:111
2 src/routes/cart.ts:78
5 src/routes/categories.ts:135
3 src/routes/orders.ts:84
5 src/routes/products.ts:158
Example error: src/routes/products.ts:530:34 - error TS2345: Argument of type 'string | string[]' is not assignable to parameter of type 'string'. Type 'string[]' is not assignable to type 'string'. 530const productId = parseInt(req.params.id, 10);
```
Contributor guide
Research direction
Run `npm run build` from `/backend` and inspect the reported locations in `src/controllers/AdminController.ts`, `src/middleware/seller.ts`, and the route files under `src/routes/`. Resolve the 18 reported TypeScript errors across the six listed files, then confirm the backend build completes without errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100