Skip to content

Project is Currently broken when attempting to build locally #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jomaa-daniel opened this issue Jan 15, 2025 · 0 comments
Open

Project is Currently broken when attempting to build locally #24

jomaa-daniel opened this issue Jan 15, 2025 · 0 comments

Comments

@jomaa-daniel
Copy link

The project will fail when running npm install, upgrading the versions of the dependencies will resolve this.

The after dependecies are installed, the project will fail to build with the following error:

 npm run build

> [email protected] build
> tsc

src/api/delete-product.ts:45:91 - error TS2345: Argument of type '[unknown]' is not assignable to parameter of type 'LogItemExtraInput'.
  Type '[unknown]' is not assignable to type '[string | Error]'.
    Type 'unknown' is not assignable to type 'string | Error'.

45     logger.error('Unexpected error occurred while trying to delete product with ID '+ id, error);
                                                                                             ~~~~~

src/api/get-product.ts:54:82 - error TS2345: Argument of type '[unknown]' is not assignable to parameter of type 'LogItemExtraInput'.
  Type '[unknown]' is not assignable to type '[string | Error]'.
    Type 'unknown' is not assignable to type 'string | Error'.

54     logger.error('Unexpected error occurred while trying to retrieve a product', error);
                                                                                    ~~~~~

src/api/put-product.ts:4:25 - error TS2307: Cannot find module '../model/product' or its corresponding type declarations.

4 import { Product } from "../model/product";
                          ~~~~~~~~~~~~~~~~~~

src/api/put-product.ts:51:80 - error TS2345: Argument of type '[unknown]' is not assignable to parameter of type 'LogItemExtraInput'.
  Type '[unknown]' is not assignable to type '[string | Error]'.
    Type 'unknown' is not assignable to type 'string | Error'.

51     logger.error('Unexpected error occurred while trying to create a product', error);
                                                                                  ~~~~~

src/api/put-product.ts:86:80 - error TS2345: Argument of type '[unknown]' is not assignable to parameter of type 'LogItemExtraInput'.
  Type '[unknown]' is not assignable to type '[string | Error]'.
    Type 'unknown' is not assignable to type 'string | Error'.

86     logger.error('Unexpected error occurred while trying to create a product', error);
                                                                                  ~~~~~

src/store/product-store.ts:3:25 - error TS2307: Cannot find module '../model/product' or its corresponding type declarations.

3 import { Product } from "../model/product";
                          ~~~~~~~~~~~~~~~~~~


Found 6 errors in 4 files.

Errors  Files
     1  src/api/delete-product.ts:45
     1  src/api/get-product.ts:54
     3  src/api/put-product.ts:4
     1  src/store/product-store.ts:3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant