Skip to content
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

chore: Fix react linting error resulting in local make build failure #3579

Closed
wants to merge 1 commit into from

Conversation

alexweav
Copy link
Contributor

@alexweav alexweav commented Oct 31, 2023

Currently, running make build from the tip of main fails on my environment.

Unclear if this something specific to my environment or not.
Node version: v16.20.0
NPM version: 8.19.4

The error seems to stem from a lint failure in the react frontend:

ERROR in ./src/views/ViewStatus.tsx:76:40
TS7006: Parameter 'peer' implicitly has an 'any' type.
    74 |           <TableCell>
    75 |             <List>
  > 76 |               {data.cluster.peers.map((peer, i) => {
       |                                        ^^^^
    77 |                 return (
    78 |                   <ListItem disablePadding sx={{ display: 'list-item' }} key={i}>
    79 |                     <p>

ERROR in ./src/views/ViewStatus.tsx:76:46
TS7006: Parameter 'i' implicitly has an 'any' type.
    74 |           <TableCell>
    75 |             <List>
  > 76 |               {data.cluster.peers.map((peer, i) => {
       |                                              ^
    77 |                 return (
    78 |                   <ListItem disablePadding sx={{ display: 'list-item' }} key={i}>
    79 |                     <p>

webpack 5.75.0 compiled with 2 errors in 5263 ms
make: *** [Makefile:37: build-react-app] Error 1

This PR fixes the lint failure. Now, make build succeeds locally for me.

@alexweav
Copy link
Contributor Author

I am not a react/JS expert by any means, so please let me know if there's a different preferred direction! I could not find any documented minimum version for tooling in CONTRIBUTING.md.

@gotjosh
Copy link
Member

gotjosh commented Nov 1, 2023

@Nexucis any thoughts?

@Nexucis
Copy link
Member

Nexucis commented Nov 1, 2023

that's odd you need to do this. This syntax shouldn't trigger the linter. I will take a look tomorrow (I'm off today).

As a side note, the PR looks totally ok.

@Nexucis
Copy link
Member

Nexucis commented Nov 2, 2023

Alright I tried on my side and look back at the CI/CD and in both context it doesn't trigger this issue. So it is certainly related to your environment.

Your npm and nodeJS version looks fine. Did you try with a fresher clone ? Perhaps there is something weird going on with the node_modules

@alexweav
Copy link
Contributor Author

alexweav commented Nov 7, 2023

I did try cleaning/clearning node_modules to no avail... but you're right, this seems specific to my environment. I'll close this.

@alexweav alexweav closed this Nov 7, 2023
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

Successfully merging this pull request may close these issues.

3 participants