button-inc / emissions-elt-demo

2 stars 0 forks source link

bug: site not compiling in GCP Cloudbuild #199

Closed joshgamache closed 1 year ago

joshgamache commented 1 year ago

🐛 Description of the bug

Noticed that builds were failing for the front end site within GCP Cloudbuild (example logfiles). Was able to reproduce the build failures locally and isolate the issue.

To reproduce

  1. Navigate to the /app directory in your shell and run npm run build.

Actual outcome: An error is thrown and build fails. Expected outcome: Site should build without errors.

Developer notes

The error thrown by NextJS is below (log snipped for brevity)

info  - Linting and checking validity of types ..Failed to compile.

./app/[lng]/analyst/upload/page.tsx:9:18
Type error: Type '{ lng: string; }' is not assignable to type 'IntrinsicAttributes'.
  Property 'lng' does not exist on type 'IntrinsicAttributes'.

   7 |   };
   8 | }) {
>  9 |   return <Upload lng={lng}></Upload>;
     |                  ^
  10 | }
  11 |
error Command failed with exit code 1.

I'm not sure of the exact reasoning for the error, but there is this post that seems relevant on Stack Overflow.

joshgamache commented 1 year ago

Update on Feb. 14th: Cloud Build is failing (logs) . Testing again with npm run build results in errors in the following files:

suggestion: since these are all pages within the unused roles, are we safe to archive/delete these pages?

shon-button commented 1 year ago

Agree, since these are all pages within the unused roles it would be safe to delete these pages.

But, I have branch 124-postgraphile-upload that I can review and or delete these files if you think that would be the best course of bug resolution.